-
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.
TableView title issue fix on windows platforms. (#25414)
* TableView title issue fix on IOS and windows platforms. * Added test cases * Modified a test cases * Modified a fix * Modified a test case * Addressed a review concerns * Removed unwanted changes * Modified the test cases * Added snap shots for android and IOS * Added image for windows * Added images for IOS * Removed IOS code changes * Added image for IOS --------- Co-authored-by: Shalini-Ashokan <[email protected]> Co-authored-by: Shalini-Ashokan <[email protected]>
- Loading branch information
1 parent
11291a2
commit adb3529
Showing
6 changed files
with
79 additions
and
2 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
Binary file added
BIN
+42.8 KB
...ols/tests/TestCases.Android.Tests/snapshots/android/ValidateTableViewTitles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,34 @@ | ||
using System; | ||
using Microsoft.Maui; | ||
using Microsoft.Maui.Controls; | ||
|
||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[Issue(IssueTracker.Github, 17123, "TableSection and TableRoot Title properties are displayed as lower case", PlatformAffected.All)] | ||
public class Issue17123 : TestContentPage | ||
{ | ||
protected override void Init() | ||
{ | ||
var tableRootLabel = new Label() { Text = "TableRoot Title Text", TextColor = Colors.Red, AutomationId = "TableRootLabel" }; | ||
var tableSectionLabel = new Label() { Text = "TableSection Title Text", TextColor = Colors.Red, AutomationId = "TableSectionLabel" }; | ||
|
||
var tableView = new TableView() { Intent = TableIntent.Menu, AutomationId = "TableView", HorizontalOptions= LayoutOptions.Center }; | ||
var tableRoot = new TableRoot(tableRootLabel.Text); | ||
var tableSection = new TableSection(tableSectionLabel.Text) | ||
{ | ||
new TextCell() { Text = "TextCell Text" , Detail="TextCell Detail" }, | ||
new EntryCell() { Label = "EntryCell Label", Placeholder="EntryCell Placeholder" }, | ||
}; | ||
|
||
tableRoot.Add(tableSection); | ||
tableView.Root = tableRoot; | ||
|
||
var stackLayout = new StackLayout(); | ||
stackLayout.Children.Add(tableRootLabel); | ||
stackLayout.Children.Add(tableSectionLabel); | ||
stackLayout.Children.Add(tableView); | ||
|
||
Content = stackLayout; | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue17123.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,43 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue17123 : _IssuesUITest | ||
{ | ||
public override string Issue => "TableSection and TableRoot Title properties are displayed as lower case"; | ||
|
||
public Issue17123(TestDevice device) : base(device) | ||
{ | ||
} | ||
|
||
[Test] | ||
[Category(UITestCategories.TableView)] | ||
public void ValidateTableViewTitles() | ||
{ | ||
App.WaitForElement("TableView"); | ||
var tableViewRootText = App.FindElement("TableRootLabel").GetText(); | ||
if (string.IsNullOrEmpty(tableViewRootText)) | ||
{ | ||
Assert.Fail("Table root text is does not match expected"); | ||
} | ||
else | ||
{ | ||
Assert.That(tableViewRootText, Is.EqualTo("TableRoot Title Text")); | ||
} | ||
|
||
var tableViewSelectionText = App.FindElement("TableSectionLabel").GetText(); | ||
if (string.IsNullOrEmpty(tableViewSelectionText)) | ||
{ | ||
Assert.Fail("Table selection text is does not match expected"); | ||
} | ||
else | ||
{ | ||
Assert.That(tableViewSelectionText, Is.EqualTo("TableSection Title Text")); | ||
} | ||
|
||
VerifyScreenshot(); | ||
} | ||
} | ||
} |
Binary file added
BIN
+15.9 KB
...trols/tests/TestCases.WinUI.Tests/snapshots/windows/ValidateTableViewTitles.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
+77 KB
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ValidateTableViewTitles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.