Skip to content

Commit

Permalink
[fix] the IDE Elyra tests
Browse files Browse the repository at this point in the history
* fixes the side bar menu navigation in RHOAI 2.17
* updates the pipelines function xpath when clicking to the topology
* updates the Sidebar menu clicked during the pipeline result check

This change is needed after the recent changes in RHOAI 2.17 dashboard.
  • Loading branch information
jstourac committed Jan 10, 2025
1 parent 7a3ef57 commit a678595
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
17 changes: 11 additions & 6 deletions ods_ci/tests/Resources/Page/Components/Menu.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@ Resource ../ODH/ODHDashboard/ODHDashboard.robot
Library String
Library JupyterLibrary


*** Variables ***
${SIDEBAR_XP} //div[@id="page-sidebar"]


*** Keywords ***
Navigate To Page
[Arguments]
... ${menu}
... ${submenu}=${NONE}
... ${timeout}=10s
Wait Until Element Is Visible //div[@id="page-sidebar"] timeout=${timeout}
Wait Until Element Is Visible ${SIDEBAR_XP} timeout=${timeout}
Wait Until Page Contains ${menu}
${menu}= Set Variable If "${menu}" == "Deployed models" Model Serving ${menu}
IF "${submenu}" == "${NONE}" Run Keyword And Return
... Click Link ${menu}
... Click Button ${SIDEBAR_XP}//button[text()="${menu}"]
${is_menu_expanded}= Menu.Is Menu Expanded ${menu}
IF "${is_menu_expanded}" == "false" Menu.Click Menu ${menu}
Wait Until Page Contains ${submenu}
Expand All @@ -23,20 +28,20 @@ Navigate To Page
Click Menu
[Arguments]
... ${menu}
Click Element //button[text()="${menu}"]
Click Element ${SIDEBAR_XP}//button[text()="${menu}"]

Click Submenu
[Arguments]
... ${submenu}
Click Element //a[text()="${submenu}"]
Click Element ${SIDEBAR_XP}//a[text()="${submenu}"]

Is Menu Expanded
[Arguments]
... ${menu}
${is_menu_expanded}= Get Element Attribute //button[text()="${menu}"] attribute=aria-expanded
${is_menu_expanded}= Get Element Attribute ${SIDEBAR_XP}//button[text()="${menu}"] attribute=aria-expanded
RETURN ${is_menu_expanded}

Page Should Contain Menu
[Arguments] ${menu}
Page Should Contain Element //button[text()="${menu}"]
Page Should Contain Element ${SIDEBAR_XP}//button[text()="${menu}"]

Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Open Pipeline Run
Wait Until Page Contains Element xpath=//*[@data-testid="active-runs-tab"] timeout=30s
Click Element xpath=//*[@data-testid="active-runs-tab"]
Wait Until Page Contains Element xpath=//span[text()='${pipeline_run_name}']
Click Element xpath=//span[text()='${pipeline_run_name}']
Click Element xpath=//td[@data-label="Name"]//span[contains(text(), '${pipeline_run_name}')]
Wait Until Page Contains Element xpath=//div[@data-test-id='topology']

# robocop: disable:line-too-long
Expand Down
2 changes: 1 addition & 1 deletion ods_ci/tests/Tests/0500__ide/0502__ide_elyra.robot
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Verify Pipelines Integration With Elyra Running Hello World Pipeline Test #
# We need to navigate to the page because the project name hold a state
# In a fresh cluster, if not state found, it will select the first one
# In this case, the first could not be the project created
Menu.Navigate To Page Data Science Pipelines
Menu.Navigate To Page Data Science Pipelines Pipelines
Select Pipeline Project By Name ${PRJ_TITLE}
Log ${pipeline_run_name}
Verify Pipeline Run Is Completed ${pipeline_run_name} timeout=5m experiment_name=${experiment_name}
Expand Down

0 comments on commit a678595

Please sign in to comment.