Skip to content

Commit b621669

Browse files
committed
Update the tests
1 parent ad7569b commit b621669

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

examples/hack_the_planet.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,15 @@ def test_all_your_base_are_belong_to_us(self):
9292
self.highlight('form[role="search"]', loops=8)
9393

9494
self.open("https://github.com/features/actions")
95-
self.set_text_content('a[href="/team"]', ayb)
96-
self.set_text_content('a[href="/enterprise"]', abtu)
95+
self.set_text_content('a[href="/pricing"]', aybabtu)
9796
self.set_text_content("h1 span:nth-child(1)", ayb)
9897
self.set_text_content("h1 span:nth-of-type(2)", "ARE")
9998
self.set_text_content("h1 span:nth-of-type(3)", "BELONG")
10099
self.set_text_content("h1 span:nth-of-type(4)", "TO")
101100
self.set_text_content("h1 span:nth-of-type(5)", "US")
102101
self.type('input[name="q"]', aybabtu.lower())
103102
self.click("h1", scroll=False)
104-
self.highlight("nav", loops=5, scroll=False)
103+
self.highlight('a[href="/pricing"]', loops=5, scroll=False)
105104
self.highlight('input[name="q"]', loops=5, scroll=False)
106105
self.highlight("h1", loops=8, scroll=False)
107106

examples/migration/protractor/input_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ class AngularMaterialInputTests(BaseCase):
55
def test_invalid_input(self):
66
# Test that there's an error for an invalid input
77
self.open("https://material.angular.io/components/input/examples")
8-
self.assert_element(".mat-button-wrapper > .mat-icon")
98
self.type("#mat-input-1", "invalid")
109
self.assert_element("mat-error")

examples/migration/protractor/mat_paginator_test.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,21 @@
55
class AngularMaterialPaginatorTests(BaseCase):
66
def test_pagination(self):
77
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")
911
# Verify navigation to the next page
1012
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+
)
1216
# Verify navigation to the previous page
1317
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
1622
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

Comments
 (0)