public void PaginationPage_LastButton_GoesToLastPage() { _paginationPage.ScrollToTheTop(); WaitUntil(x => _paginationPage.DropDown.Displayed); _paginationPage.DropdownSelect("Show 15 items per page"); WaitForText(_paginationPage.PaginationInfoLabel, "page 1 of 7", 5); WaitUntil(x => _paginationPage.PaginationResult.Count == 15); _paginationPage.GoToPage("Last"); WaitUntil(y => _paginationPage.PaginationResult.Where(x => x.Text.Contains("99")). Select(x => x.Text).First() == "Arbitrary Book 99 Arbitrary Author"); _paginationPage.GoToPage("3"); WaitUntil(y => _paginationPage.PaginationResult.Where(x => x.Text.Contains("40")). Select(x => x.Text).First() == "Arbitrary Book 40 Arbitrary Author"); _paginationPage.GoToPage("First"); WaitUntil(y => _paginationPage.PaginationResult.Where(x => x.Text.Contains("1")). Select(x => x.Text).First() == "Arbitrary Book 1 Arbitrary Author"); }
public void PaginationPage_LastButton_GoesToLastPage() { _paginationPage.ScrollToTheTop(); WaitUntil(x => _paginationPage.DropDown.Displayed); _paginationPage.DropdownSelect("15"); Assert.IsTrue(WaitForText(_paginationPage.PaginationInfoLabel, "page 1 of 7", 5)); Assert.AreEqual(15, _paginationPage.PaginationResult.Count); _paginationPage.GoToPage(">>"); Assert.AreEqual("Arbitrary Book 99 - Arbitrary Author", _paginationPage.PaginationResult. Where(x => x.Text.Contains("99")). Select(x => x.Text).First()); _paginationPage.GoToPage("3"); Assert.AreEqual("Arbitrary Book 40 - Arbitrary Author", _paginationPage.PaginationResult. Where(x => x.Text.Contains("40")). Select(x => x.Text).First()); _paginationPage.GoToPage("<<"); Assert.AreEqual("Arbitrary Book 1 - Arbitrary Author", _paginationPage.PaginationResult. Where(x => x.Text.Contains("1")). Select(x => x.Text).First()); }