Skip to content

Commit 03f349a

Browse files
committed
Update examples that test Angular sites
1 parent a3cc95c commit 03f349a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

examples/migration/protractor/input_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ class AngularMaterialInputTests(BaseCase):
66
def test_invalid_input(self):
77
# Test that there's an error for an invalid input
88
self.open("https://material.angular.io/components/input/examples")
9-
self.type("#mat-input-1", "invalid")
9+
self.type('input[type="email"]', "invalid")
1010
self.assert_element("mat-error")

examples/migration/protractor/mat_paginator_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
class AngularMaterialPaginatorTests(BaseCase):
66
def test_pagination(self):
77
self.open("https://material.angular.io/components/paginator/examples")
8+
self.click_if_visible("button.mat-mdc-button")
9+
self.scroll_to("div.mat-mdc-paginator-page-size")
810
# Set pagination to 5 items per page
911
self.click("mat-select > div")
10-
self.click("#mat-option-0")
12+
self.click("mat-option:nth-of-type(1)")
1113
# Verify navigation to the next page
1214
self.click('button[aria-label="Next page"]')
1315
self.assert_exact_text(
@@ -20,7 +22,7 @@ def test_pagination(self):
2022
)
2123
# Set pagination to 10 items per page
2224
self.click("mat-select > div")
23-
self.click("#mat-option-1")
25+
self.click("mat-option:nth-of-type(2)")
2426
# Verify page with correct number of pages
2527
self.assert_exact_text(
2628
"1 – 10 of 50", ".mat-mdc-paginator-range-label"

0 commit comments

Comments
 (0)