Skip to content

Commit 848c9eb

Browse files
authored
Update example.com hyperlink (#835)
Fixes several tests that access the example.com page hyperlink
1 parent 63397ea commit 848c9eb

7 files changed

+19
-18
lines changed

SELECTOR_INFO.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,7 +1835,7 @@ Path to .json: modules/data/exemple_page.components.json
18351835
```
18361836
Selector Name: learn-more
18371837
Selector Data: "Learn more"
1838-
Description: More information..." link
1838+
Description: "Learn more" link
18391839
Location: The hyperlink positioned in the middle of example.com page
18401840
Path to .json: modules/data/exemple_page.components.json
18411841
```
@@ -3238,7 +3238,7 @@ Path to .json: modules/data/panel_ui.components.json
32383238
```
32393239
```
32403240
Selector name: panel-ui-history-recently-closed-reopen-tabs
3241-
Selector Data: toolbarbutton[class='subviewbutton subviewbutton-nav'][label='Recently closed tabs']
3241+
Selector Data: toolbarbutton[class='restoreallitem subviewbutton panel-subview-footer-button']
32423242
Description: Recently closed reopen tabs
32433243
Location: On the hamburger menu > History
32443244
Path to .json: modules/data/panel_ui.components.json

tests/menus/test_hyperlink_context_menu.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ def test_open_link_in_new_window(driver: Firefox):
1919
example = ExamplePage(driver)
2020
example.open()
2121

22-
# right click the hyperlink
22+
# Right-click the hyperlink
2323
example.context_click("learn-more")
2424

25-
# click on the open in new window option
25+
# Click on the open in new window option
2626
hyperlink_context.click_and_hide_menu("context-menu-open-link-in-new-window")
2727

28-
# verify there are two instances (two windows)
28+
# Verify there are two instances (two windows)
2929
tabs.wait_for_num_windows(2)
3030
driver.switch_to.window(driver.window_handles[1])
3131

tests/menus/test_tab_context_menu_actions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ def test_duplicate_tab(driver: Firefox):
2828

2929
tabs_to_open = 4
3030

31-
# open some tabs
31+
# Open some tabs
3232
for i in range(tabs_to_open):
3333
driver.get(links[i])
3434
tabs.new_tab_by_button()
3535
driver.switch_to.window(driver.window_handles[i + 1])
3636

37-
# context click
37+
# Context click
3838
first_tab = tabs.get_tab(1)
3939
tabs.context_click(first_tab)
4040
tab_context_menu.click_and_hide_menu("context-menu-duplicate-tab")
4141

42-
# get the current tab and assert the url
42+
# Get the current tab and assert the url
4343
driver.switch_to.window(driver.window_handles[tabs_to_open + 1])
4444
current_page = driver.current_url
4545
assert current_page == links[0]
@@ -54,7 +54,7 @@ def test_close_multiple_tabs_to_right(driver: Firefox):
5454

5555
tabs_to_open = 4
5656

57-
# open some tabs
57+
# Open some tabs
5858
for i in range(tabs_to_open):
5959
driver.get(links[i])
6060
tabs.new_tab_by_button()

tests/menus/test_tab_context_menu_close.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,27 +93,29 @@ def test_copy_link(driver: Firefox):
9393
nav = Navigation(driver)
9494
hyperlink_context = ContextMenu(driver)
9595
tabs = TabBar(driver)
96-
example = ExamplePage(driver).open()
96+
example = ExamplePage(driver)
9797

98-
# right click the hyperlink
98+
example.open()
99+
100+
# Right-click the hyperlink
99101
sleep(1)
100102
example.context_click("learn-more")
101103

102-
# click on the open in new window option
104+
# Click on the open in new window option
103105
sleep(1)
104106
hyperlink_context.click_and_hide_menu("context-menu-copy-link")
105107

106-
# open a new tab
108+
# Open a new tab
107109
tabs.new_tab_by_button()
108110
tabs.wait_for_num_tabs(2)
109111
sleep(1)
110112
driver.switch_to.window(driver.window_handles[1])
111113

112-
# # context click and paste
114+
# Context click and paste
113115
search_bar = nav.get_awesome_bar()
114116
nav.context_click(search_bar)
115117

116-
# paste and go
118+
# Paste and go
117119
nav.click_and_hide_menu("context-menu-paste-and-go")
118120

119121
example.title_contains(example.MORE_INFO_TITLE)

tests/tabs/test_open_new_tab_via_hyperlink.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from modules.browser_object import ContextMenu
55
from modules.page_object import ExamplePage
66

7-
87
URL = "https://www.iana.org/help/example-domains"
98

109

tests/tabs/test_pin_tab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
from modules.browser_object import ContextMenu, TabBar
55

6-
76
NUM_TABS = 5
87

8+
99
@pytest.fixture()
1010
def test_case():
1111
return "134722"

tests/tabs/test_reopen_tab_through_context_menu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
from modules.browser_object import ContextMenu, TabBar
55

6-
76
TABS_TO_OPEN = 4
87
FIRST_URL = "about:about"
98
SECOND_URL = "about:robots"
109

10+
1111
@pytest.fixture()
1212
def test_case():
1313
return "134648"

0 commit comments

Comments
 (0)