-
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.
Hidden ListView doesn't appear as expected - fix
- Loading branch information
Showing
4 changed files
with
88 additions
and
0 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
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,36 @@ | ||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[Issue(IssueTracker.Github, 27630, "Hidden ListView doesn't appear as expected", PlatformAffected.iOS | PlatformAffected.Android)] | ||
public class Issue27630 : TestContentPage | ||
{ | ||
protected override void Init() | ||
{ | ||
var listView = new ListView | ||
{ | ||
HeightRequest = 100, | ||
IsVisible = false, | ||
ItemTemplate = new DataTemplate(() => new ViewCell() | ||
{ | ||
View = new Label() | ||
{ | ||
Text = "Hello", | ||
AutomationId = "ViewCellLabel" | ||
} | ||
}), | ||
ItemsSource = new string[] { "Item 1", "Item 2", "Item 3" } | ||
}; | ||
|
||
var button = new Button | ||
{ | ||
Text = "Show/Hide ListView", | ||
AutomationId = "Button", | ||
Command = new Command(() => listView.IsVisible = !listView.IsVisible) | ||
}; | ||
|
||
Content = new VerticalStackLayout() | ||
{ | ||
Children = { button, listView } | ||
}; | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27630.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,26 @@ | ||
#if ANDROID || IOS | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue27630 : _IssuesUITest | ||
{ | ||
public Issue27630(TestDevice testDevice) : base(testDevice) | ||
{ | ||
} | ||
|
||
public override string Issue => "Hidden ListView doesn't appear as expected"; | ||
|
||
[Test] | ||
[Category(UITestCategories.ListView)] | ||
public void ListViewShouldBeVisible() | ||
{ | ||
App.WaitForElement("Button"); | ||
App.Click("Button"); | ||
App.WaitForElement("ViewCellLabel"); | ||
} | ||
} | ||
} | ||
#endif |