Skip to content

Commit 85522c9

Browse files
committed
Add 172045 test
1 parent 1ca81a5 commit 85522c9

File tree

2 files changed

+17
-26
lines changed

2 files changed

+17
-26
lines changed

tests/bookmarks_and_history/test_clear_all_history.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ def test_clear_all_history(driver: Firefox):
3030

3131
# Select the option to clear all the history
3232
panel.select_history_time_range_option("Everything")
33-
# A method in panel-ui with selectors moved accordingly would work better, limited for now due to context level
34-
# set to chrome context while shadow parent needs content context
33+
# A method in panel-ui with selectors moved accordingly would work better, I'll come to this later, couldn't make it work so far
3534
page.click_on("clear-history-button")
3635

3736
# Verify all the history is deleted

tests/bookmarks_and_history/test_opened_website_in_new_tab_present_in_toolbar_history.py

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,29 @@ def test_case():
1010
return "118802"
1111

1212

13-
FACEBOOK_URL = "https://www.facebook.com/"
14-
AMAZON_URL = "https://www.amazon.com/"
15-
YOUTUBE_URL = "https://www.youtube.com/"
13+
@pytest.fixture()
14+
def use_profile():
15+
return "theme_change"
16+
1617

17-
WEBSITES = [FACEBOOK_URL, AMAZON_URL]
18+
ETSY_URL = "https://www.etsy.com/"
1819

1920

2021
def test_the_website_opened_in_new_tab_is_present_in_history_menu(driver: Firefox):
2122
"""
22-
C118802 - Verify that the website opened in new tab is displayed in the Toolbar History submenu on top of the
23+
C118802 - Verify that the website opened in new tab is displayed in Hamburger Menu, History section, on top of the
2324
list
2425
"""
25-
26-
for url in WEBSITES:
27-
GenericPage(driver, url=url).open()
28-
26+
# Instantiate objects
2927
tabs = TabBar(driver)
28+
page = GenericPage(driver, url=ETSY_URL)
29+
panel = PanelUi(driver)
3030

31-
tabs.new_tab_by_button()
32-
tabs.wait_for_num_tabs(2)
33-
tabs.switch_to_new_tab()
34-
35-
page = GenericPage(driver, url=YOUTUBE_URL)
36-
page.open()
37-
page.url_contains("youtube")
38-
39-
panel_ui = PanelUi(driver)
40-
panel_ui.open()
41-
panel_ui.open_history_menu()
31+
# Open a new tab, switch to it and verify is the url contains the desired domain
32+
tabs.open_web_page_in_new_tab(page, 2)
33+
page.url_contains("etsy")
4234

43-
# Verify YouTube is present in the history menu and is on top of the list as the most recent website visited
44-
panel_ui.expect_element_attribute_contains(
45-
"recent-history-content", "value", "YouTube"
46-
)
35+
# Verify Etsy is present in the Hamburger Menu, History section and is on top of the list as the most recent
36+
# website visited
37+
panel.open_history_menu()
38+
panel.expect_element_attribute_contains("recent-history-content", "value", "Etsy")

0 commit comments

Comments
 (0)