Skip to content

Commit e4aad4b

Browse files
committed
Remove parameterization
1 parent 0a7ace4 commit e4aad4b

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

tests/address_bar_and_search/test_server_not_found_error.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,25 @@ def add_prefs():
1515
]
1616

1717

18-
@pytest.mark.parametrize(
19-
"url, site_name, suggestion_url",
20-
[
21-
("http://cnn", "cnn", "https://www.cnn.com/"),
22-
("http://example", "example", "https://www.example.com/"),
23-
],
24-
)
25-
def test_server_not_found_error(driver: Firefox, url, site_name, suggestion_url):
18+
def test_server_not_found_error(driver: Firefox):
2619
"""
2720
C1901393: - This tests that when a user navigates to a non-existent site, a "Server Not Found" error is
2821
displayed. The error page contains the correct elements, and the suggested link redirects to the appropriate page.
29-
3022
"""
3123

3224
# Create objects
3325
nav = Navigation(driver).open()
3426
tabs = TabBar(driver)
3527
error_page = ErrorPage(driver)
3628

37-
nav.search(url)
29+
nav.search("http://cnn")
3830

3931
# Verify the tab title
40-
4132
WebDriverWait(driver, 30).until(
4233
lambda d: tabs.get_tab_title(tabs.get_tab(1)) == "Server Not Found"
4334
)
4435

4536
# Verify elements on the error page
46-
4737
error_title = error_page.get_error_title()
4838
assert (
4939
error_title == "Hmm. We’re having trouble finding that site."
@@ -52,7 +42,7 @@ def test_server_not_found_error(driver: Firefox, url, site_name, suggestion_url)
5242
error_short_description = error_page.get_error_short_description()
5343
assert (
5444
error_short_description
55-
== f"We can’t connect to the server at {site_name}. Did you mean to go to www.{site_name}.com?"
45+
== "We can’t connect to the server at cnn. Did you mean to go to www.cnn.com?"
5646
), (
5747
f"Expected error short description text not found."
5848
f"Actual: {error_short_description}"
@@ -74,6 +64,5 @@ def test_server_not_found_error(driver: Firefox, url, site_name, suggestion_url)
7464
assert try_again_button.is_displayed(), "The 'Try Again' button is not displayed"
7565

7666
# Verify that the suggested link redirects to the correct page
77-
7867
error_page.get_error_suggestion_link().click()
79-
nav.expect_in_content(EC.url_contains(suggestion_url))
68+
nav.expect_in_content(EC.url_contains("https://www.cnn.com/"))

0 commit comments

Comments
 (0)