-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove code from iOS that short circuits propagation (#24477)
* Remove code from iOS that short circuits propagation * - fix
- Loading branch information
Showing
7 changed files
with
77 additions
and
14 deletions.
There are no files selected for viewing
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
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,47 @@ | ||
using Microsoft.Maui.Controls.Internals; | ||
|
||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[Issue(IssueTracker.Github, 24434, "Modifying a layout while view isn't part of the Window fails to update the layout visually", | ||
PlatformAffected.iOS)] | ||
public class Issue24434 : NavigationPage | ||
{ | ||
public Issue24434() : base(new TestPage()) | ||
{ | ||
|
||
} | ||
|
||
public class TestPage : ContentPage | ||
{ | ||
public TestPage() | ||
{ | ||
VerticalStackLayout vsl = new VerticalStackLayout(); | ||
|
||
vsl.Add(new Button() | ||
{ | ||
Text = "Click me and you should see a label appear beneath me", | ||
LineBreakMode = LineBreakMode.WordWrap, | ||
AutomationId = "ClickMe", | ||
Command = new Command(async () => | ||
{ | ||
TaskCompletionSource taskCompletionSource = new TaskCompletionSource(); | ||
vsl.Unloaded += (_, _) => | ||
{ | ||
vsl.Add(new Label { Text = "Hello, World!", AutomationId = "Success" }); | ||
taskCompletionSource.TrySetResult(); | ||
}; | ||
await Navigation.PushAsync(new ContentPage() { Content = new Label() { Text = "I should just disappear" } }); | ||
await Navigation.PushModalAsync(new ContentPage() { Content = new Label() { Text = "I should just disappear" } }); | ||
await taskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(5)); | ||
await Navigation.PopModalAsync(); | ||
await Navigation.PopAsync(); | ||
}) | ||
}); | ||
|
||
Content = vsl; | ||
} | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24434.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 Issue24434 : _IssuesUITest | ||
{ | ||
public Issue24434(TestDevice testDevice) : base(testDevice) | ||
{ | ||
} | ||
|
||
public override string Issue => "Modifying a layout while view isn't part of the Window fails to update the layout visually"; | ||
|
||
[Test] | ||
[Category(UITestCategories.Layout)] | ||
public void ModifyingANonVisibleLayoutWorks() | ||
{ | ||
App.WaitForElement("ClickMe"); | ||
App.Tap("ClickMe"); | ||
App.WaitForElement("Success"); | ||
} | ||
} | ||
} |
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
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
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
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