diff --git a/ods_ci/tests/Resources/Page/Components/Menu.robot b/ods_ci/tests/Resources/Page/Components/Menu.robot index 92be3751b..7bc04ab40 100644 --- a/ods_ci/tests/Resources/Page/Components/Menu.robot +++ b/ods_ci/tests/Resources/Page/Components/Menu.robot @@ -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} @@ -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}"] diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataSciencePipelines.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataSciencePipelines.resource index d5e3a0dc4..0e8439b49 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataSciencePipelines.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataSciencePipelines.resource @@ -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 diff --git a/ods_ci/tests/Tests/0500__ide/0502__ide_elyra.robot b/ods_ci/tests/Tests/0500__ide/0502__ide_elyra.robot index 614f0ab72..770a77329 100644 --- a/ods_ci/tests/Tests/0500__ide/0502__ide_elyra.robot +++ b/ods_ci/tests/Tests/0500__ide/0502__ide_elyra.robot @@ -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}