Skip to content

Commit 500be21

Browse files
committed
FRW-9914: fix MP login keyword
1 parent 0cbe99f commit 500be21

File tree

3 files changed

+54
-8
lines changed

3 files changed

+54
-8
lines changed

resources/common/common_mp.robot

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,20 @@ MP: login on MP with provided credentials:
3535
${is_login_page}= Run Keyword And Ignore Error Page Should Contain Element ${mp_user_name_field} timeout=10ms
3636
Restore Automatic Screenshots on Failure
3737
IF 'FAIL' in $is_login_page
38-
Delete All Cookies
3938
TRY
4039
LocalStorage Clear
4140
EXCEPT
4241
Log Failed to clear LocalStorage
4342
END
43+
Delete All Cookies
4444
MP: go to URL: /
4545
END
46+
TRY
47+
Wait For Load State
48+
Wait For Load State domcontentloaded
49+
EXCEPT
50+
Log Page is not fully loaded
51+
END
4652
Wait Until Element Is Visible ${mp_user_name_field}
4753
${email_value}= Convert To Lower Case ${email}
4854
IF '+merchant+' in '${email_value}' VAR ${password} ${default_secure_password}
@@ -51,13 +57,19 @@ MP: login on MP with provided credentials:
5157
# workaround for the issue with deadlocks on concurrent login attempts
5258
${is_5xx}= Click and return True if 5xx occurred: ${mp_login_button}
5359
IF ${is_5xx}
54-
Delete All Cookies
5560
TRY
5661
LocalStorage Clear
5762
EXCEPT
5863
Log Failed to clear LocalStorage
5964
END
65+
Delete All Cookies
6066
MP: go to URL: /
67+
TRY
68+
Wait For Load State
69+
Wait For Load State domcontentloaded
70+
EXCEPT
71+
Log Page is not fully loaded
72+
END
6173
Wait Until Element Is Visible ${mp_user_name_field}
6274
${email_value}= Convert To Lower Case ${email}
6375
IF '+merchant+' in '${email_value}' VAR ${password} ${default_secure_password}
@@ -66,21 +78,33 @@ MP: login on MP with provided credentials:
6678
Click ${mp_login_button}
6779
END
6880
Disable Automatic Screenshots on Failure
69-
${login_success}= Run Keyword And Ignore Error Wait Until Element Is Visible ${mp_user_menu_button} MP: Login failed! Retrying... timeout=5s
81+
${login_success}= Run Keyword And Ignore Error Wait Until Element Is Visible ${mp_user_menu_button} MP: Login failed! Retrying... timeout=15s
7082
Restore Automatic Screenshots on Failure
7183
IF 'FAIL' in $login_success
72-
Delete All Cookies
7384
TRY
7485
LocalStorage Clear
7586
EXCEPT
7687
Log Failed to clear LocalStorage
7788
END
89+
Delete All Cookies
7890
MP: go to URL: /
91+
TRY
92+
Wait For Load State
93+
Wait For Load State domcontentloaded
94+
EXCEPT
95+
Log Page is not fully loaded
96+
END
7997
Wait Until Element Is Visible ${mp_user_name_field}
8098
Type Text ${mp_user_name_field} ${email}
8199
Type Text ${mp_password_field} ${password}
82100
Click ${mp_login_button}
83101
END
102+
TRY
103+
Wait For Load State
104+
Wait For Load State domcontentloaded
105+
EXCEPT
106+
Log Page is not fully loaded
107+
END
84108
Wait Until Element Is Visible ${mp_user_menu_button} MP: Login failed! timeout=15s
85109

86110
MP: login on MP with provided credentials and expect error:

resources/common/common_yves.robot

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ Yves: login on Yves with provided credentials:
7676
END
7777
END
7878
${currentURL}= Get Url
79+
TRY
80+
Wait For Load State
81+
Wait For Load State domcontentloaded
82+
EXCEPT
83+
Log page is not fully loaded
84+
END
7985
Type Text ${email_field} ${email}
8086
Type Text ${password_field} ${password}
8187
Click ${form_login_button}

resources/common/common_zed.robot

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ Zed: login on Zed with provided credentials:
5858
END
5959
Zed: go to URL: /
6060
END
61+
TRY
62+
Wait For Load State
63+
Wait For Load State domcontentloaded
64+
EXCEPT
65+
Log Page is not fully loaded
66+
END
6167
Wait Until Element Is Visible ${zed_user_name_field}
6268
${email_value}= Convert To Lower Case ${email}
6369
IF '+merchant+' in '${email_value}' VAR ${password} ${default_secure_password}
@@ -73,6 +79,12 @@ Zed: login on Zed with provided credentials:
7379
Log Failed to clear LocalStorage
7480
END
7581
Zed: go to URL: /
82+
TRY
83+
Wait For Load State
84+
Wait For Load State domcontentloaded
85+
EXCEPT
86+
Log Page is not fully loaded
87+
END
7688
Wait Until Element Is Visible ${zed_user_name_field}
7789
${email_value}= Convert To Lower Case ${email}
7890
IF '+merchant+' in '${email_value}' VAR ${password} ${default_secure_password}
@@ -82,24 +94,28 @@ Zed: login on Zed with provided credentials:
8294
END
8395
TRY
8496
Repeat Keyword 3 Wait For Load State
85-
Wait Until Element Is Visible ${zed_log_out_button} Zed: Login failed! timeout=5s
97+
Wait Until Element Is Visible ${zed_log_out_button} Zed: Login failed! timeout=15s
8698
EXCEPT
87-
Delete All Cookies
88-
Reload
8999
TRY
90100
LocalStorage Clear
91101
EXCEPT
92102
Log Failed to clear LocalStorage
93103
END
94104
Delete All Cookies
95105
Zed: go to URL: /
106+
TRY
107+
Wait For Load State
108+
Wait For Load State domcontentloaded
109+
EXCEPT
110+
Log Page is not fully loaded
111+
END
96112
Wait Until Element Is Visible ${zed_user_name_field}
97113
${email_value}= Convert To Lower Case ${email}
98114
IF '+merchant+' in '${email_value}' VAR ${password} ${default_secure_password}
99115
Type Text ${zed_user_name_field} ${email}
100116
Type Text ${zed_password_field} ${password}
101117
Click ${zed_login_button}
102-
Wait Until Element Is Visible ${zed_log_out_button} Zed: Login failed! timeout=10s
118+
Wait Until Element Is Visible ${zed_log_out_button} Zed: Login failed! timeout=15s
103119
END
104120

105121
Zed: login with deactivated user/invalid data:

0 commit comments

Comments
 (0)