Skip to content

Commit

Permalink
UITest/BookLib: extend a test with scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
jbe2277 committed Nov 9, 2024
1 parent 1868834 commit 11f51ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Samples.UITest/BookLibrary.Test/Tests/BookLibraryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public void SearchBookListAndChangeEntriesTest() => Run(() =>
{
Log.WriteLine($"{i:00}: {bookListView.BookDataGrid.GetRowByIndex(i).As<BookGridRow>().TitleCell.Label.Text}");
}
var firstBook = bookListView.BookDataGrid.GetRowByIndex(0).As<BookGridRow>();
var lastBook = bookListView.BookDataGrid.GetRowByIndex(rowCount - 1).As<BookGridRow>();
// GetRowByIndex scrolls to the item -> let's scroll back to the first book
Assert.True(firstBook.IsOffscreen);
firstBook.ScrollIntoView();
Assert.False(firstBook.IsOffscreen);
bookListView.SearchBox.Text = "Ha";
Assert.Equal(13, bookListView.BookDataGrid.RowCount);
Expand Down

0 comments on commit 11f51ac

Please sign in to comment.