-
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.
Fix ShellContent Title doesn't observe changes to bound properties (#…
…24806) * fix added * UI test added * platform affected codes updated * script file changes updated * review changes updated * Test case file changes updated * tabbar automation id casing updated * Automation ID changed for button * unshipped file changes reverted * changes updated * platform condition updated * UI test modified * screen shot added * access specifier changed
- Loading branch information
1 parent
e0b3526
commit 6a6f383
Showing
10 changed files
with
120 additions
and
3 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
2 changes: 1 addition & 1 deletion
2
src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt
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 |
---|---|---|
@@ -1 +1 @@ | ||
#nullable enable | ||
#nullable enable |
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
Binary file added
BIN
+34.1 KB
...ols/tests/TestCases.Android.Tests/snapshots/android/ChangeShellContentTitle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions
29
src/Controls/tests/TestCases.HostApp/Issues/Issue7453.xaml
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,29 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<Shell xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.Controls.Sample.Issues.Issue7453" | ||
FlyoutBehavior="Disabled" | ||
Title="Issue7453"> | ||
<TabBar AutomationId="TabBar"> | ||
<Tab Title="Nested Tabs" AutomationId="tabbar"> | ||
<ShellContent x:Name="tab" Title="Home"> | ||
<ContentPage> | ||
<StackLayout HorizontalOptions="Center" Spacing="30"> | ||
<HorizontalStackLayout> | ||
<Label Text="Current Shell Title : " FontAttributes="Bold"/> | ||
<Label Text="{Binding Source={x:Reference tab}, Path=Title}" AutomationId="LabelId" /> | ||
</HorizontalStackLayout> | ||
<Button Text="Change Title" AutomationId="ChangeShellContentTitle" VerticalOptions="Center" HorizontalOptions="Center" WidthRequest="100" HeightRequest="40" Clicked="OnButtonClicked"/> | ||
</StackLayout> | ||
</ContentPage> | ||
</ShellContent> | ||
|
||
<ShellContent Title="Settings"> | ||
<ContentPage> | ||
<Label Text="This is Settings page"/> | ||
</ContentPage> | ||
</ShellContent> | ||
</Tab> | ||
</TabBar> | ||
|
||
</Shell> |
16 changes: 16 additions & 0 deletions
16
src/Controls/tests/TestCases.HostApp/Issues/Issue7453.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,16 @@ | ||
namespace Maui.Controls.Sample.Issues; | ||
|
||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 7453, "ShellContent Title doesn't observe changes to bound properties", PlatformAffected.UWP | PlatformAffected.Android)] | ||
public partial class Issue7453 : Shell | ||
{ | ||
public Issue7453() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void OnButtonClicked(object sender, EventArgs e) | ||
{ | ||
this.tab.Title = "Updated title"; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue7453.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,32 @@ | ||
#if !MACCATALYST | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Microsoft.Maui.Controls; | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue7453 : _IssuesUITest | ||
{ | ||
public Issue7453(TestDevice device) : base(device) | ||
{ | ||
} | ||
|
||
public override string Issue => "ShellContent Title doesn't observe changes to bound properties"; | ||
|
||
[Test] | ||
[Category(UITestCategories.Shell)] | ||
public void ChangeShellContentTitle() | ||
{ | ||
App.WaitForElement("ChangeShellContentTitle"); | ||
App.Click("ChangeShellContentTitle"); | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} | ||
#endif |
Binary file added
BIN
+10.3 KB
...trols/tests/TestCases.WinUI.Tests/snapshots/windows/ChangeShellContentTitle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+37.3 KB
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ChangeShellContentTitle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.