Skip to content

Commit

Permalink
[Windows] Fix for Flyout Content Template not updating dynamically (#…
Browse files Browse the repository at this point in the history
…26536)

* Windows FlyoutContentTemplate fix

* Enabled test case

* Test script changes
  • Loading branch information
Tamilarasan-Paranthaman authored Jan 10, 2025
1 parent 836975d commit bff4ab0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/Controls/src/Core/Handlers/Shell/ShellHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public partial class ShellHandler
[nameof(Shell.FlyoutItems)] = MapFlyoutItems,
#if WINDOWS
[nameof(Shell.FlyoutIcon)] = MapFlyoutIcon,
[nameof(Shell.FlyoutContentTemplate)] = MapFlyout,
#endif
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
#if TEST_FAILS_ON_WINDOWS // On Windows, the Shell Flyout Content Template does not update dynamically. Issue: https://github.com/dotnet/maui/issues/26435.
using NUnit.Framework;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Issues;

public class ShellFlyoutContent : _IssuesUITest
{

#if WINDOWS //In Windows AutomationId for FlyoutItems not works in Appium.
const string FlyoutItem = "Flyout Item Top";
const string ResetButton = "Click to Reset";
#else
const string FlyoutItem = "FlyoutItem";
const string ResetButton = "Reset";
#endif

public ShellFlyoutContent(TestDevice testDevice) : base(testDevice)
{
}
Expand All @@ -18,14 +26,12 @@ public ShellFlyoutContent(TestDevice testDevice) : base(testDevice)
public void FlyoutContentTests()
{
App.WaitForElement("PageLoaded");
App.TapInShellFlyout("FlyoutItem");
App.TapInShellFlyout(FlyoutItem);
App.Tap("ToggleContent");
App.TapInShellFlyout("ContentView");
App.Tap("FlyoutItem");
App.Tap(FlyoutItem);
App.Tap("ToggleFlyoutContentTemplate");
App.TapInShellFlyout("Reset");
App.Tap("FlyoutItem");
App.TapInShellFlyout(ResetButton);
App.Tap(FlyoutItem);
}
}
#endif

}

0 comments on commit bff4ab0

Please sign in to comment.