diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDashboard.robot b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDashboard.robot index 4a8f628ab..6c73ef789 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDashboard.robot +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDashboard.robot @@ -823,7 +823,7 @@ Handle Deletion Confirmation Modal IF "${additional_msg}" != "${NONE}" Run Keyword And Continue On Failure Page Should Contain ${additional_msg} END - Run Keyword And Continue On Failure Page Should Contain Confirm deletion by typing ${item_title} below: + Run Keyword And Continue On Failure Page Should Contain Type ${item_title} to confirm deletion. Run Keyword And Continue On Failure Element Should Be Disabled ${delete_btn_xp} Input Text xpath=//input[@id="delete-modal-input"] ${item_title} Wait Until Element Is Enabled ${delete_btn_xp} diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource index 90f5c8db5..2389a7b22 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource @@ -107,7 +107,7 @@ Project's Owner Should Be [Documentation] Checks if the owner of a DS project is displayed and corresponds to the expected one [Arguments] ${project_title} ${expected_username} Run Keyword And Continue On Failure - ... Page Should Contain Element xpath=//td[div/div/a[text()="${project_title}"]]/small[text()="${expected_username}"] + ... Page Should Contain Element xpath=//a[text()="${project_title}"]/ancestor::td[@data-label='Name']//small[text()="${expected_username}"] Create Data Science Project [Documentation] Creates a DS Project with the given ${title}, ${description} and ${resource_name} @@ -185,7 +185,7 @@ Workbench Status Should Be From Projects Home Page ${namespace}= Get Openshift Namespace From Data Science Project project_title=${project_title} ${_} ${workbench_cr_name}= Get Openshift Notebook CR From Workbench workbench_title=${workbench_title} ... namespace=${namespace} - Run Keyword And Continue On Failure Page Should Contain Element xpath=//tr[td/div/div/a[text()="${project_title}"]]/td[@data-label="Status"]//div[div/label[contains(@for,"${workbench_cr_name}")]]/div//p[text()="${status}"] # robocop: disable + Run Keyword And Continue On Failure Page Should Contain Element xpath=//a[text()="${project_title}"]/ancestor::tr/td[@data-label="Status"]//p[text()="${status}"] # robocop: disable Start Workbench From Projects Home Page [Documentation] Triggers the workbench "start" process from DS Projects home page. @@ -205,7 +205,8 @@ Start Workbench From Projects Home Page ... Get Openshift Notebook CR From Workbench workbench_title=${workbench_title} ... namespace=${namespace} END - Click Element xpath=//tr[td/div/div/a[text()="${project_title}"]]/td/div//label[contains(@for,"${workbench_cr_name}")]/span[@class="pf-c-switch__toggle"] # robocop: disable + Click Element xpath=//a[text()="${workbench_title}"]/ancestor::tr//a[text()="${project_title}"]/ancestor::tr//td[@data-label="Status"]//label[@class="pf-v5-c-switch"] # robocop: disable + ELSE Fail msg=Cannot start ${workbench_title} workbench because it is not stopped. END @@ -233,7 +234,7 @@ Stop Workbench From Projects Home Page END ${_} ${workbench_cr_name}= Get Openshift Notebook CR From Workbench workbench_title=${workbench_title} namespace=${namespace} END - Click Element xpath=//tr[td/div/div/a[text()="${project_title}"]]/td/div//label[contains(@for,"${workbench_cr_name}")]/span[@class="pf-c-switch__toggle"] # robocop: disable + Click Element xpath=//a[text()="${workbench_title}"]/ancestor::tr//a[text()="${project_title}"]/ancestor::tr//td[@data-label="Status"]//label[@class="pf-v5-c-switch"] # robocop: disable Handle Stop Workbench Confirmation Modal press_cancel=${press_cancel} ELSE Fail msg=Cannot stop ${workbench_title} workbench because it is neither starting nor running. @@ -260,7 +261,7 @@ Launch And Access Workbench From Projects Home Page ${is_started}= Run Keyword And Return Status Workbench Status Should Be From Projects Home Page ... workbench_title=${workbench_title} status=${WORKBENCH_STATUS_RUNNING} project_title=${project_title} IF ${is_started} == ${TRUE} - Click Element xpath=//tr[td/div/div/a[text()="${project_title}"]]/td//a[text()="${workbench_title}"] + Click Element xpath=//tr//a[text()="${project_title}"]/ancestor::tr/td[@data-label="Workbench"]//a[text()="${workbench_title}"] Switch Window NEW Access To Workbench username=${username} password=${password} ... auth_type=${auth_type} @@ -272,7 +273,7 @@ Workbench Launch Link Should Be Disabled [Documentation] Checks the workbench launch link is disabled from DS Projects home page. [Arguments] ${workbench_title} ${project_title} ${link_status}= Get Element Attribute - ... xpath=//tr[td/div/div/a[text()="${project_title}"]]/td//a[text()="${workbench_title}"] aria-disabled + ... xpath=//tr//a[text()="${project_title}"]/ancestor::tr/td[@data-label="Workbench"]//a[text()="${workbench_title}"] aria-disabled Should Be Equal As Strings ${link_status} true ... msg=Workbench launch link should be disabled for workbench ${workbench_title} in project ${project_title} diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource index d1f7ec64c..a685eecac 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Storages.resource @@ -9,7 +9,7 @@ Resource Projects.resource ${STORAGE_SECTION_XP}= xpath=//div[@id="cluster-storages"] ${STORAGE_NAME_INPUT_XP}= xpath=//input[@name="create-new-storage-name"] ${STORAGE_DESCR_INPUT_XP}= xpath=//textarea[@name="create-new-storage-description"] -${STORAGE_SIZE_INPUT_XP}= xpath=//div/input[contains(@aria-label,"input") or contains(@aria-label,"Input")] +${STORAGE_SIZE_INPUT_XP}= xpath=//input[@aria-label="Input"] ${STORAGE_SIZE_PLUS_BTN_XP}= xpath=//div/button[@aria-label="Plus"] ${STORAGE_MOUNT_DIR_INPUT_XP}= xpath=//input[@aria-label="mount-path-folder-value"] ${STORAGE_WORKBENCH_SELECTOR_XP}= xpath=//div[contains(@class,"modal")]//div[contains(@class,"pf-c-select")]/ul/li diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource index de391806f..6dcae38b3 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource @@ -192,7 +192,7 @@ Select An Existent PV ... Wait Until Element Is Enabled xpath=//input[@placeholder="Select a persistent storage"] Click Element xpath=//input[@placeholder="Select a persistent storage"] Wait Until Page Contains Element xpath=//ul/li/button[text()="${name}"] - Wait Until Page Contains Element xpath=//div[contains(@class,"pf-c-select")]/ul/li/button[text()="${name}"] + Wait Until Page Contains Element xpath=//ul[@aria-label="Persistent storage select"]//button[text()="${name}"] Click Element xpath=//ul/li/button[text()="${name}"] Select Workbench Jupyter Image @@ -309,7 +309,7 @@ Start Workbench ${is_stopped}= Run Keyword And Return Status Workbench Status Should Be ... workbench_title=${workbench_title} status=${WORKBENCH_STATUS_STOPPED} IF ${is_stopped} == ${TRUE} - Click Element ${WORKBENCH_SECTION_XP}//tr[td[@data-label="Name"]/*[div[text()="${workbench_title}"]]]/td[@data-label="Status"]//span[@class="pf-c-switch__toggle"] + Click Element ${WORKBENCH_SECTION_XP}//div[text()="${workbench_title}"]/ancestor::tr/td[@data-label="Status"]//label[@data-ouia-component-type="PF5/Switch"] ELSE Log msg=Cannot start ${workbench_title} workbench because it is not stopped. END @@ -355,7 +355,7 @@ Stop Workbench ${is_starting}= Run Keyword And Return Status Workbench Status Should Be ... workbench_title=${workbench_title} status=${WORKBENCH_STATUS_STARTING} IF ${is_started} == ${TRUE} or ${is_starting} == ${TRUE} - Click Element ${WORKBENCH_SECTION_XP}//tr[td[@data-label="Name"]/*[div[text()="${workbench_title}"]]]/td[@data-label="Status"]//span[@class="pf-c-switch__toggle"] + Click Element ${WORKBENCH_SECTION_XP}//div[text()="${workbench_title}"]/ancestor::tr/td[@data-label="Status"]//label[@data-ouia-component-type="PF5/Switch"] Wait Until Generic Modal Appears Handle Stop Workbench Confirmation Modal press_cancel=${press_cancel} ... from_running=${from_running} @@ -385,9 +385,9 @@ Handle Stop Workbench Confirmation Modal Click Action From Actions Menu [Documentation] Clicks an action from Actions menu (3-dots menu on the right) [Arguments] ${item_title} ${item_type} ${action} - Click Element xpath=//tr[td[@data-label="Name"]//*[text()="${item_title}"]]/td[@class="pf-c-table__action"]/div/button[@aria-label="Actions"] - Wait Until Page Contains Element xpath=//tr[td[@data-label="Name"]//*[text()="${item_title}"]]/td[@class="pf-c-table__action"]/div/ul/li/button[text()="${action} ${item_type}"] - Click Element xpath=//tr[td[@data-label="Name"]//*[text()="${item_title}"]]/td[@class="pf-c-table__action"]/div/ul/li/button[text()="${action} ${item_type}"] + Click Element xpath=//*[text()="${item_title}"]/ancestor::tr//td/button[@aria-label="Kebab toggle"] + Wait Until Page Contains Element xpath=//*[text()="${item_title}"]/ancestor::tr//td//li//span[text()="${action} ${item_type}"] + Click Element xpath=//*[text()="${item_title}"]/ancestor::tr//td//li//span[text()="${action} ${item_type}"] Delete Workbench [Documentation] Deletes a workbench