Tables
25 people, sorted, filtered and split into pages of 10 on the server. Every state has its own address.
25 people · Page 1 of 3
| Name ▲ | Country | Role | Joined |
|---|---|---|---|
| Amina Hodžić | Bosnia and Herzegovina | Tester | 2019 |
| Ana Radović | Montenegro | Tester | 2020 |
| Daniel Green | United States | Team lead | 2011 |
| Emily Carter | United States | Product owner | 2020 |
| Felix Schneider | Germany | Tester | 2017 |
| Grace Taylor | United Kingdom | Tester | 2024 |
| Haris Kovačević | Bosnia and Herzegovina | Product owner | 2018 |
| Harry Wilson | United Kingdom | Team lead | 2016 |
| Ivana Horvat | Croatia | Tester | 2023 |
| Jelena Nikolić | Serbia | Developer | 2019 |
What to practise
- Count the rows on a page (10, then 5 on the last page) and compare with the counter.
- Sort by a column, sort again to reverse it, and read the first row.
- Filter by a country or a role; filter by something nobody has and check the message.
- Each row has the id
person-<number>; each cell a class:name,country,role,joined.
Tables in VAF: AsTableBody() in the guide, section 2.
Tested in VAF-Demo
A test of this page from VAF-Demo, written with shared steps: the test says what the user does, the steps hold the VAF chains.
[TestCase("Germany", 4, "Felix Schneider")]
[TestCase("Montenegro", 3, "Ana Radović")]
[TestCase("Team lead", 5, "Daniel Green")]
[TestCase("bosnia", 4, "Amina Hodžić")]
public void FilterNarrowsTheTable(string filter, int people, string first)
{
TablesSteps.LetsFilter(filter);
TablesSteps.LetsCheckTheNumberOfPeople(people);
TablesSteps.LetsCheckTheFirstPerson(first);
}
On GitHub (opens in a new tab)
-
Page object
—
TablesPage.cs: the locators of this page -
Native tests
—
TablesTests.cs: the whole VAF chain in each test -
Shared steps
—
TablesSteps.cs: the steps the test above calls -
Shared steps tests
—
TablesStepsTests.cs: the tests of this page written with steps - The whole project and its README Latest test run (GitHub Actions)