Skip to content

Commit

Permalink
[fix] the login to OCM
Browse files Browse the repository at this point in the history
During our global move to PatternFly 5 changes in Dashboard, we probably
accidentally changed also selector for the OCM login page, which still
uses older version obviously.

On top of that I updated some other xpaths for the OCM and also amended
the way how the Cookies settings modal window is being handled since it
also seem to slightly different now.
  • Loading branch information
jstourac committed Apr 29, 2024
1 parent 1af11d2 commit d905c6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions ods_ci/tests/Resources/Page/HybridCloudConsole/HCCLogin.robot
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ Maybe Agree RH Terms and Conditions
END

Maybe Accept Cookie Policy
${cookie_required}= Run Keyword And Return Status Page Should Contain We use cookies on this site
${cookie_required}= Run Keyword And Return Status Wait Until Page Contains Element
... xpath=//iframe[@title='TrustArc Cookie Consent Manager'] timeout=10
IF ${cookie_required} == True
Select Frame xpath=//iframe[@title='TrustArc Cookie Consent Manager']
Wait Until Page Contains Element xpath=//a[contains(@class, 'required')] timeout=10
Click Link xpath=//a[contains(@class, 'required')]
Wait Until Page Contains Element xpath=//a[contains(@class, 'close')] timeout=10
Click Link xpath=//a[contains(@class, 'close')]
Wait Until Page Does Not Contain xpath=//iframe[@title='TrustArc Cookie Consent Manager']
Wait Until Page Does Not Contain Element xpath=//iframe[@title='TrustArc Cookie Consent Manager']
Wait Until Page Does Not Contain We use cookies on this site
Unselect Frame
Capture Page Screenshot cookieaccepted.png
END
Expand Down
6 changes: 4 additions & 2 deletions ods_ci/tests/Resources/Page/HybridCloudConsole/OCM.robot
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*** Settings ***
Resource ../../Common.robot
Resource ./HCCLogin.robot

Library SeleniumLibrary

Expand All @@ -9,11 +10,12 @@ Wait Until OCM Cluster Page Is Loaded
[Documentation] wait until the OCM page loads for ${cluster_name}
[Arguments] ${cluster_name}
Wait OCM Splash Page
Element Should Contain //div[@class="pf-l-split__item"]/h1 ${cluster_name}
Element Should Contain //div[@class="pf-v5-l-split__item"]/h1 ${cluster_name}

Login To OCM
[Documentation] Login to the OpenShift Cluster Manager
Input Text //div[@class="pf-v5-c-form__group"]/input ${SSO.USERNAME}
Maybe Accept Cookie Policy
Input Text //div[@class="pf-c-form__group"]/input ${SSO.USERNAME} # This is OCM page, so not PatternFly 5
Click Button //*[@id="login-show-step2"]
Sleep 1s
Input Text //*[@id="password"] ${SSO.PASSWORD}
Expand Down

0 comments on commit d905c6f

Please sign in to comment.