|
5 | 5 | class AngularMaterialPaginatorTests(BaseCase): |
6 | 6 | def test_pagination(self): |
7 | 7 | self.open("https://material.angular.io/components/paginator/examples") |
8 | | - self.assert_element(".mat-button-wrapper > .mat-icon") |
| 8 | + # Set pagination to 5 items per page |
| 9 | + self.click("mat-select > div") |
| 10 | + self.click("#mat-option-0") |
9 | 11 | # Verify navigation to the next page |
10 | 12 | self.click('button[aria-label="Next page"]') |
11 | | - self.assert_exact_text("Page 2 of 10", ".mat-paginator-range-label") |
| 13 | + self.assert_exact_text( |
| 14 | + "Page 2 of 10", ".mat-mdc-paginator-range-label" |
| 15 | + ) |
12 | 16 | # Verify navigation to the previous page |
13 | 17 | self.click('button[aria-label="Previous page"]') |
14 | | - self.assert_exact_text("Page 1 of 10", ".mat-paginator-range-label") |
15 | | - # Verify changed list length to 5 items per page |
| 18 | + self.assert_exact_text( |
| 19 | + "Page 1 of 10", ".mat-mdc-paginator-range-label" |
| 20 | + ) |
| 21 | + # Set pagination to 10 items per page |
16 | 22 | self.click("mat-select > div") |
17 | | - self.click("mat-option > .mat-option-text") |
18 | | - self.assert_exact_text("Page 1 of 20", ".mat-paginator-range-label") |
| 23 | + self.click("#mat-option-1") |
| 24 | + # Verify page with correct number of pages |
| 25 | + self.assert_exact_text("Page 1 of 5", ".mat-mdc-paginator-range-label") |
0 commit comments