-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix StrokeDashArray on Border does not reset when set to null #29910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
291d810
3a5dada
e2078d3
05f9800
bb27bd3
0101f3b
5e67a9b
644d3de
74c379b
d676d0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| using System.Collections.ObjectModel; | ||
|
|
||
| namespace Maui.Controls.Sample.Issues; | ||
| [Issue(IssueTracker.Github, 29898, "[iOS, macOS] StrokeDashArray on Border does not reset when set to null", PlatformAffected.iOS)] | ||
| public class Issue29898 : ContentPage | ||
| { | ||
| public Issue29898() | ||
| { | ||
| var border = new Border | ||
| { | ||
| HeightRequest = 200, | ||
| WidthRequest = 200, | ||
| BackgroundColor = Colors.LightGray, | ||
| Stroke = Colors.Blue, | ||
| StrokeThickness = 5, | ||
| StrokeDashArray = new DoubleCollection { 10, 5 } | ||
| }; | ||
|
|
||
| var button = new Button | ||
| { | ||
| Text = "Clear StrokeDashArray", | ||
| AutomationId = "ClearDashButton", | ||
| HorizontalOptions = LayoutOptions.Center | ||
| }; | ||
|
|
||
| var button2 = new Button | ||
| { | ||
| Text = "Set StrokeDashArray", | ||
| AutomationId = "SetDashButton", | ||
| HorizontalOptions = LayoutOptions.Center | ||
| }; | ||
|
|
||
| button.Clicked += (s, e) => | ||
| { | ||
| border.StrokeDashArray = null; | ||
|
devanathan-vaithiyanathan marked this conversation as resolved.
|
||
| }; | ||
|
|
||
| button2.Clicked += (s, e) => | ||
| { | ||
| border.StrokeDashArray = new DoubleCollection { 5, 2 }; | ||
| }; | ||
|
|
||
| var layout = new VerticalStackLayout | ||
| { | ||
| Spacing = 25, | ||
| Padding = new Thickness(30, 60, 30, 30), | ||
| VerticalOptions = LayoutOptions.Center, | ||
| Children = { border, button, button2 } | ||
| }; | ||
|
|
||
| Content = layout; | ||
| } | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
|
||
| public class Issue29898 : _IssuesUITest | ||
| { | ||
| public override string Issue => "[iOS, macOS] StrokeDashArray on Border does not reset when set to null"; | ||
|
|
||
| public Issue29898(TestDevice device) | ||
| : base(device) | ||
| { } | ||
|
|
||
| [Test, Order(1)] | ||
| [Category(UITestCategories.Border)] | ||
| public void VerifyBorderWithNullStrokeDashArray() | ||
| { | ||
| App.WaitForElement("ClearDashButton"); | ||
| App.Tap("ClearDashButton"); | ||
| VerifyScreenshot(); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [moderate] Regression Prevention and Test Coverage - This screenshot is taken immediately after tapping a button that changes |
||
| } | ||
|
|
||
| [Test, Order(2)] | ||
| [Category(UITestCategories.Border)] | ||
| public void VerifyBorderWithStrokeDashArrayValue() | ||
| { | ||
| App.WaitForElement("SetDashButton"); | ||
| App.Tap("SetDashButton"); | ||
| VerifyScreenshot(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pending snapshots. Running a build.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jsuarezruiz , I have added the pending snapshot. |
||
| } | ||
| } | ||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[minor] UI Test Coverage - The issue metadata scopes this page to
PlatformAffected.iOS, but this PR changes Windows and iOS/MacCatalyst code and adds Windows/Mac/Android snapshots. Update the attribute/description to match the intended coverage, e.g.PlatformAffected.Allif this should run everywhere, orPlatformAffected.iOS | PlatformAffected.macOS | PlatformAffected.UWPif Android coverage is not intended.