File tree Expand file tree Collapse file tree 5 files changed +20
-6
lines changed Expand file tree Collapse file tree 5 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ def test_case():
10
10
return "2241087"
11
11
12
12
13
+ ABOUT_LOGINS_PAGE_TITLE = "Passwords"
14
+
15
+
13
16
@pytest .mark .ci
14
17
def test_about_logins_navigation_from_login_form_context_menu (driver : Firefox ):
15
18
"""
@@ -19,13 +22,14 @@ def test_about_logins_navigation_from_login_form_context_menu(driver: Firefox):
19
22
# Instantiate objects
20
23
context_menu = ContextMenu (driver )
21
24
tabs = TabBar (driver )
22
- login = LoginAutofill (driver ). open ()
25
+ login = LoginAutofill (driver )
23
26
24
27
# Access the manage passwords in context menu from the username field in the demo login form
28
+ login .open ()
25
29
username_field = login .get_element ("username-field" )
26
30
login .context_click (username_field )
27
31
context_menu .click_and_hide_menu ("context-menu-manage-passwords" )
28
32
29
33
# Verify that the about:logins page is opened in a new tab
30
34
tabs .wait_for_num_tabs (2 )
31
- tabs .title_contains ("Passwords" )
35
+ tabs .title_contains (ABOUT_LOGINS_PAGE_TITLE )
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ def test_case():
9
9
return "2241082"
10
10
11
11
12
+ ABOUT_LOGINS_PAGE_TITLE = "Passwords"
13
+
14
+
12
15
def test_about_logins_navigation_from_password_hamburger_menu (driver : Firefox ):
13
16
"""
14
17
C2241082 - Verify that clicking the Password option in Hamburger Menu opens about:logins page in a new tab
@@ -23,4 +26,4 @@ def test_about_logins_navigation_from_password_hamburger_menu(driver: Firefox):
23
26
24
27
# Verify that the about:logins page is opened in a new tab
25
28
tabs .wait_for_num_tabs (2 )
26
- tabs .title_contains ("Passwords" )
29
+ tabs .title_contains (ABOUT_LOGINS_PAGE_TITLE )
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ def test_case():
9
9
return "2241113"
10
10
11
11
12
+ WEBSITE_ADDRESS = "mozilla.org"
13
+
14
+
12
15
def test_add_password_non_ascii_chars (driver : Firefox ):
13
16
"""
14
17
C2241113 Add password - non-ascii characters
@@ -33,6 +36,6 @@ def test_add_password_non_ascii_chars(driver: Firefox):
33
36
about_logins .get_element ("login-list-item" )
34
37
logins = about_logins .get_elements ("login-list-item" )
35
38
mozilla_login = next (
36
- login for login in logins if login .get_attribute ("title" ) == "mozilla.org"
39
+ login for login in logins if login .get_attribute ("title" ) == WEBSITE_ADDRESS
37
40
)
38
41
assert mozilla_login
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ def test_case():
10
10
return "2241112"
11
11
12
12
13
+ WEBSITE_ADDRESS = "mozilla.org"
14
+
15
+
13
16
def test_add_password_save_valid_data (driver : Firefox ):
14
17
"""
15
18
C2241112 Verify that a password can be added and saved
@@ -34,7 +37,7 @@ def test_add_password_save_valid_data(driver: Firefox):
34
37
about_logins .get_element ("login-list-item" )
35
38
logins = about_logins .get_elements ("login-list-item" )
36
39
mozilla_login = next (
37
- login for login in logins if login .get_attribute ("title" ) == "mozilla.org"
40
+ login for login in logins if login .get_attribute ("title" ) == WEBSITE_ADDRESS
38
41
)
39
42
assert mozilla_login
40
43
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ def hard_quit():
16
16
17
17
18
18
PRIMARY_PASSWORD = "securePassword1"
19
+ ALERT_MESSAGE = "Primary Password successfully changed."
19
20
20
21
21
22
def test_add_primary_password (driver : Firefox ):
@@ -45,5 +46,5 @@ def test_add_primary_password(driver: Firefox):
45
46
# Check that the pop-up appears
46
47
with driver .context (driver .CONTEXT_CHROME ):
47
48
alert = about_prefs .get_alert ()
48
- assert alert .text == "Primary Password successfully changed."
49
+ assert alert .text == ALERT_MESSAGE
49
50
alert .accept ()
You can’t perform that action at this time.
0 commit comments