-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Background gradients fixes * Add test snapshots * Pending snapshot --------- Co-authored-by: Javier Suárez <[email protected]>
- Loading branch information
1 parent
19e900d
commit b6ea3df
Showing
7 changed files
with
115 additions
and
1 deletion.
There are no files selected for viewing
Binary file added
BIN
+40.8 KB
...es.Android.Tests/snapshots/android/BackgroundGradientsShouldRenderCorrectly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions
77
src/Controls/tests/TestCases.HostApp/Issues/Issue25193.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.Controls.Sample.Issues.Issue25193"> | ||
<VerticalStackLayout> | ||
<Label Text="Label: "/> | ||
<Label | ||
Text="Hello, Maui!" | ||
AutomationId="label"> | ||
<Label.Background> | ||
<LinearGradientBrush EndPoint="1,0"> | ||
<GradientStop Color="Red" | ||
Offset="0.7"/> | ||
<GradientStop Color="Green" | ||
Offset="1.0"/> | ||
</LinearGradientBrush> | ||
</Label.Background> | ||
</Label> | ||
|
||
<Label Text="Button: "/> | ||
<Button Text="Hello, Maui!"> | ||
<Button.Background> | ||
<LinearGradientBrush EndPoint="1,0"> | ||
<GradientStop Color="Blue" | ||
Offset="0.7"/> | ||
<GradientStop Color="Yellow" | ||
Offset="1.0"/> | ||
</LinearGradientBrush> | ||
</Button.Background> | ||
</Button> | ||
|
||
<Label Text="Entry: "/> | ||
<Entry Text="Hello, Maui!"> | ||
<Entry.Background> | ||
<LinearGradientBrush EndPoint="1,0"> | ||
<GradientStop Color="Pink" | ||
Offset="0.7"/> | ||
<GradientStop Color="Lime" | ||
Offset="1.0"/> | ||
</LinearGradientBrush> | ||
</Entry.Background> | ||
</Entry> | ||
|
||
<Label Text="Picker: "/> | ||
<Picker | ||
Title="Hello, Maui!"> | ||
<Picker.Background> | ||
<LinearGradientBrush EndPoint="1,0"> | ||
<GradientStop Color="Brown" | ||
Offset="0.7"/> | ||
<GradientStop Color="Gold" | ||
Offset="1.0"/> | ||
</LinearGradientBrush> | ||
</Picker.Background> | ||
</Picker> | ||
|
||
|
||
<Label Text="Scroll view: "/> | ||
<ScrollView Orientation="Horizontal" | ||
HeightRequest="100"> | ||
<ScrollView.Background> | ||
<LinearGradientBrush StartPoint="0,0.5" | ||
EndPoint="1,0.5"> | ||
<LinearGradientBrush.GradientStops> | ||
<GradientStop Color="Orange" | ||
Offset="0.75"/> | ||
<GradientStop Color="Purple" | ||
Offset="1"/> | ||
</LinearGradientBrush.GradientStops> | ||
</LinearGradientBrush> | ||
</ScrollView.Background> | ||
|
||
<Border WidthRequest="1200"/> | ||
</ScrollView> | ||
|
||
</VerticalStackLayout> | ||
</ContentPage> |
12 changes: 12 additions & 0 deletions
12
src/Controls/tests/TestCases.HostApp/Issues/Issue25193.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 25193, "Background gradients don't work for some views", PlatformAffected.iOS)] | ||
public partial class Issue25193 : ContentPage | ||
{ | ||
public Issue25193() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25193.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
||
public class Issue25193 : _IssuesUITest | ||
{ | ||
public Issue25193(TestDevice device) : base(device) { } | ||
|
||
public override string Issue => "Background gradients don't work for some views"; | ||
|
||
[Test] | ||
[Category(UITestCategories.Label)] | ||
[Category(UITestCategories.ScrollView)] | ||
[Category(UITestCategories.Button)] | ||
[Category(UITestCategories.Entry)] | ||
[Category(UITestCategories.Picker)] | ||
public void BackgroundGradientsShouldRenderCorrectly() | ||
{ | ||
App.WaitForElement("label"); | ||
VerifyScreenshot(); | ||
} | ||
} |
Binary file added
BIN
+11.2 KB
...ases.WinUI.Tests/snapshots/windows/BackgroundGradientsShouldRenderCorrectly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+227 KB
.../TestCases.iOS.Tests/snapshots/ios/BackgroundGradientsShouldRenderCorrectly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters