-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UITest/InfoMan: assert Document text
- Loading branch information
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
src/Samples.UITest/InformationManager.Test/Controls/Document.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,9 @@ | ||
using FlaUI.Core.AutomationElements; | ||
using FlaUI.Core; | ||
|
||
namespace UITest.InformationManager.Controls; | ||
|
||
public class Document(FrameworkAutomationElementBase element) : AutomationElement(element) | ||
{ | ||
public string GetText(int maxLenght) => Patterns.Text.Pattern.DocumentRange.GetText(maxLenght); | ||
} |
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,4 +1,5 @@ | ||
using FlaUI.Core.AutomationElements; | ||
using UITest.InformationManager.Controls; | ||
using UITest.InformationManager.Views; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
@@ -22,6 +23,7 @@ public void SearchEmailsAndAssertLists() => Run(() => | |
for (int i = 0; i < count; i++) Log.WriteLine($"{i:00}: {emailListView.EmailItems[i].ToReceivedTuple()}"); | ||
|
||
AssertEmail(true, emailListView.EmailItems[0], emailView, "[email protected]", "[email protected]", "8/9/2012", "5:58:21 AM", "Nunc sed dis suscipit"); | ||
Assert.Equal("Scelerisque est odio", emailView.Document.As<Document>().GetText(20)); | ||
|
||
Assert.Equal("Search", emailListView.SearchBox.SearchHintLabel.Text); | ||
emailListView.SearchBox.SearchTextBox.Text = "!"; | ||
|
@@ -34,7 +36,6 @@ public void SearchEmailsAndAssertLists() => Run(() => | |
var item = emailListView.EmailList.SelectedItem.As<EmailListItem>(); | ||
AssertEmail(true, item, emailView, "[email protected]", "[email protected]", "9/5/2005", "4:34:45 PM", "Taciti enim"); | ||
|
||
|
||
window.RootTreeItem.OutboxNode.Select(); | ||
emailListView = window.EmailLayoutView.EmailListView; | ||
emailView = window.EmailLayoutView.EmailView; | ||
|
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