Skip to content

Commit

Permalink
Fix; 11846 user can start stop launch delete workbench (#1901)
Browse files Browse the repository at this point in the history
* fix: ODS-2206, wrong pipelines xpath

* fix: Verify Users Can Start, Stop, Launch And Delete A Workbench
  • Loading branch information
FedeAlonso authored Oct 8, 2024
1 parent 55a958c commit 89480f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,15 +357,13 @@ Add And Run JupyterLab Code Cell 5 In Active Notebook
[Arguments] @{code} ${n}=1
# This keyword was copied and amended from JupyterLibrary resources - Notebook.Add And Run JupyterLab Code Cell.

${add icon} = Get JupyterLab Icon XPath Custom add

${nb} = Get WebElement xpath://div${JLAB XP NB FRAG}\[${n}]
${nbid} = Get Element Attribute ${nb} id

${active-nb-tab} = Get WebElement xpath:${JL_TABBAR_SELECTED_XPATH}
${tab-id} = Get Element Attribute ${active-nb-tab} id

Click Element xpath://div[@aria-labelledby="${tab-id}"]/div[1]//${add icon}
Click Element xpath://div[@aria-labelledby="${tab-id}"]//div[@data-jp-item-name="insert"]
Sleep 0.1s
Click Element xpath://div[@aria-labelledby="${tab-id}"]//div[contains(concat(' ',normalize-space(@class),' '),' jp-mod-selected ')]
Set CodeMirror Value \#${nbid}${JLAB CSS ACTIVE INPUT} @{code}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,9 @@ 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}//div[text()="${workbench_title}"]/ancestor::tr/td[@data-label="Status"]//label[@data-ouia-component-type="PF5/Switch"]
Click Button xpath=//div[@data-testid="table-row-title"]//span[text()="${workbench_title}"]/ancestor::tr//button[@aria-label="Kebab toggle"]
Wait Until Element Is Visible xpath=//div[@data-testid="table-row-title"]//span[text()="${workbench_title}"]/ancestor::tr//button[@aria-label="Kebab toggle"]/following::div//span[text()="Start"] timeout=10
Click Element xpath=//div[@data-testid="table-row-title"]//span[text()="${workbench_title}"]/ancestor::tr//button[@aria-label="Kebab toggle"]/following::div//span[text()="Start"]
ELSE
Log msg=Cannot start ${workbench_title} workbench because it is not stopped.
END
Expand Down Expand Up @@ -405,7 +407,9 @@ 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}//div[text()="${workbench_title}"]/ancestor::tr/td[@data-label="Status"]//label[@data-ouia-component-type="PF5/Switch"]
Click Button xpath=//div[@data-testid="table-row-title"]//span[text()="${workbench_title}"]/ancestor::tr//button[@aria-label="Kebab toggle"]
Wait Until Element Is Visible xpath=//div[@data-testid="table-row-title"]//span[text()="${workbench_title}"]/ancestor::tr//button[@aria-label="Kebab toggle"]/following::div//span[text()="Stop"] timeout=10
Click Element xpath=//div[@data-testid="table-row-title"]//span[text()="${workbench_title}"]/ancestor::tr//button[@aria-label="Kebab toggle"]/following::div//span[text()="Stop"]
Wait Until Generic Modal Appears
Handle Stop Workbench Confirmation Modal press_cancel=${press_cancel}
... from_running=${from_running}
Expand Down

0 comments on commit 89480f8

Please sign in to comment.