diff --git a/examples/hack_the_planet.py b/examples/hack_the_planet.py index 7d47f2b3..c7c5c8be 100755 --- a/examples/hack_the_planet.py +++ b/examples/hack_the_planet.py @@ -92,8 +92,7 @@ class HackTests(BaseCase): self.highlight('form[role="search"]', loops=8) self.open("https://github.com/features/actions") - self.set_text_content('a[href="/team"]', ayb) - self.set_text_content('a[href="/enterprise"]', abtu) + self.set_text_content('a[href="/pricing"]', aybabtu) self.set_text_content("h1 span:nth-child(1)", ayb) self.set_text_content("h1 span:nth-of-type(2)", "ARE") self.set_text_content("h1 span:nth-of-type(3)", "BELONG") @@ -101,7 +100,7 @@ class HackTests(BaseCase): self.set_text_content("h1 span:nth-of-type(5)", "US") self.type('input[name="q"]', aybabtu.lower()) self.click("h1", scroll=False) - self.highlight("nav", loops=5, scroll=False) + self.highlight('a[href="/pricing"]', loops=5, scroll=False) self.highlight('input[name="q"]', loops=5, scroll=False) self.highlight("h1", loops=8, scroll=False) diff --git a/examples/migration/protractor/input_test.py b/examples/migration/protractor/input_test.py index 77e93308..b2344734 100644 --- a/examples/migration/protractor/input_test.py +++ b/examples/migration/protractor/input_test.py @@ -5,6 +5,5 @@ class AngularMaterialInputTests(BaseCase): def test_invalid_input(self): # Test that there's an error for an invalid input self.open("https://material.angular.io/components/input/examples") - self.assert_element(".mat-button-wrapper > .mat-icon") self.type("#mat-input-1", "invalid") self.assert_element("mat-error") diff --git a/examples/migration/protractor/mat_paginator_test.py b/examples/migration/protractor/mat_paginator_test.py index a0374a02..1bc2d56c 100644 --- a/examples/migration/protractor/mat_paginator_test.py +++ b/examples/migration/protractor/mat_paginator_test.py @@ -5,14 +5,21 @@ from seleniumbase import BaseCase class AngularMaterialPaginatorTests(BaseCase): def test_pagination(self): self.open("https://material.angular.io/components/paginator/examples") - self.assert_element(".mat-button-wrapper > .mat-icon") + # Set pagination to 5 items per page + self.click("mat-select > div") + self.click("#mat-option-0") # Verify navigation to the next page self.click('button[aria-label="Next page"]') - self.assert_exact_text("Page 2 of 10", ".mat-paginator-range-label") + self.assert_exact_text( + "Page 2 of 10", ".mat-mdc-paginator-range-label" + ) # Verify navigation to the previous page self.click('button[aria-label="Previous page"]') - self.assert_exact_text("Page 1 of 10", ".mat-paginator-range-label") - # Verify changed list length to 5 items per page + self.assert_exact_text( + "Page 1 of 10", ".mat-mdc-paginator-range-label" + ) + # Set pagination to 10 items per page self.click("mat-select > div") - self.click("mat-option > .mat-option-text") - self.assert_exact_text("Page 1 of 20", ".mat-paginator-range-label") + self.click("#mat-option-1") + # Verify page with correct number of pages + self.assert_exact_text("Page 1 of 5", ".mat-mdc-paginator-range-label")