Skip to content

Commit 4503a18

Browse files
authored
Merge pull request #609 from mozilla/tracy/fix_adaptive_history_test
Make check adaptable to webpage title changes
2 parents 89d8b7e + 2a446d1 commit 4503a18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/address_bar_and_search/test_adaptive_history_autofill.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
WAIT_TIMEOUT = 10
1010
TEST_URL = "https://www.nationalgeographic.com/science/"
11-
EXPECTED_TITLE = "Science"
11+
EXPECTED_IN_TITLE = "Science"
1212
EXPECTED_TYPE = "autofill_adaptive"
1313
EXPECTED_TEXT_FRAGMENT = "nationalgeographic.com/science"
1414

@@ -33,7 +33,7 @@ def test_add_adaptive_history_autofill(driver: Firefox):
3333
# Step 1: Visit the test site and verify tab title
3434
nav.search(TEST_URL)
3535
WebDriverWait(driver, WAIT_TIMEOUT).until(
36-
lambda d: tabs.get_tab_title(tabs.get_tab(1)) == EXPECTED_TITLE
36+
lambda d: tabs.expect_title_contains(EXPECTED_IN_TITLE)
3737
)
3838

3939
# Step 2: Open new tab, close the original
@@ -42,7 +42,7 @@ def test_add_adaptive_history_autofill(driver: Firefox):
4242
driver.switch_to.window(driver.window_handles[1])
4343
tabs.close_first_tab_by_icon()
4444

45-
# Step 3: Type in address bar, click adaptive suggestion
45+
# Step 3: Type in address bar, then click adaptive suggestion
4646
nav.type_in_awesome_bar("nat")
4747
nav.click_firefox_suggest()
4848
nav.expect_in_content(EC.url_contains(TEST_URL))

0 commit comments

Comments
 (0)