-
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.
- Loading branch information
Showing
3 changed files
with
75 additions
and
1 deletion.
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
47 changes: 47 additions & 0 deletions
47
src/Controls/tests/TestCases.HostApp/Issues/Issue23674.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,47 @@ | ||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 23674, "Page.IsBusy activity indicators gets stuck/causes multiple to be displayed", PlatformAffected.Android)] | ||
public class Issue23674 : NavigationPage | ||
{ | ||
public Issue23674() : base(new Issue23674Page1()){ } | ||
|
||
class Issue23674Page1 : ContentPage | ||
{ | ||
public Issue23674Page1() | ||
{ | ||
Content = new Button() | ||
{ | ||
AutomationId = "button1", | ||
VerticalOptions = LayoutOptions.Start, | ||
Text = "Navigate to page 1", | ||
HeightRequest = 100, | ||
Command = new Command(async ()=> | ||
{ | ||
await Navigation.PushAsync(new Issue23674Page2()); | ||
}) | ||
}; | ||
} | ||
} | ||
|
||
class Issue23674Page2 : ContentPage | ||
{ | ||
public Issue23674Page2() | ||
{ | ||
IsBusy = true; | ||
Content = new Button() | ||
{ | ||
AutomationId = "button2", | ||
VerticalOptions = LayoutOptions.Start, | ||
Text = "Navigate to page 2", | ||
HeightRequest = 100, | ||
Command = new Command(() => | ||
{ | ||
Navigation.PopAsync(); | ||
}) | ||
}; | ||
IsBusy = true; | ||
} | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue23674.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,27 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue23674 : _IssuesUITest | ||
{ | ||
public override string Issue => "Page.IsBusy activity indicators gets stuck/causes multiple to be displayed"; | ||
|
||
public Issue23674(TestDevice device) : base(device) { } | ||
|
||
[Test] | ||
[Category(UITestCategories.Page)] | ||
public void Issue23674Test() | ||
{ | ||
App.WaitForElement("button1"); | ||
App.Click("button1"); | ||
App.WaitForElement("button2"); | ||
App.Click("button2"); | ||
App.WaitForElement("button1"); | ||
|
||
// The test passes if activity indicator is not visible | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} |