Skip to content

Commit

Permalink
Test Pipeline YAML context menu and verify read only
Browse files Browse the repository at this point in the history
- Test that the context menu (right click) of a Pipeline YAML has a
command menu, and responds to user typing "Fold All" yaml tags.
- Verify YAML text is readonly
(Bug opendatahub-io/odh-dashboard#1689)

Signed-off-by: manosnoam <nmanos@redhat.com>
  • Loading branch information
manosnoam committed Oct 31, 2023
1 parent f635baa commit e7f73c4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,24 @@ Click Action From Actions Menu
Wait Until Page Contains Element //table//tr[td[*[a[text()='${pipeline_name}']]]]//td[contains(@class, 'pf-c-table__action')]/div/ul/li/button[contains(text(), '${action}')]
Click Element //table//tr[td[*[a[text()='${pipeline_name}']]]]//td[contains(@class, 'pf-c-table__action')]/div/ul/li/button[contains(text(), '${action}')]

Pipeline Context Menu Should Be Readonly
[Documentation] Test Pipeline YAML context menu and verify read only (https://github.com/opendatahub-io/odh-dashboard/issues/1689)
[Arguments] ${pipeline_name}
${orig wait}= SeleniumLibrary.Set Selenium Implicit Wait 10s
Wait Until Element is Visible //button[contains(text(), "Data Science Pipelines")] timeout=30

Check warning

Code scanning / Robocop

Keyword name '{{ keyword_name }}' does not follow case convention Warning test

Keyword name 'Wait Until Element is Visible' does not follow case convention
Click Button Data Science Pipelines
Click Link Pipelines
Wait Until Element is Visible //a[text()="${pipeline_name}"] timeout=30s

Check warning

Code scanning / Robocop

Keyword name '{{ keyword_name }}' does not follow case convention Warning test

Keyword name 'Wait Until Element is Visible' does not follow case convention
Click Link ${pipeline_name}
Click Element //button[@aria-label="Pipeline YAML Tab"]
Open Context Menu //div[contains(@class, 'lines-content')]
Click Element //button[@aria-label="Pipeline YAML Tab"]
Press Keys //div[contains(@class, 'lines-content')] F1+fold+SPACE+all+ENTER
Press Keys //div[contains(@class, 'lines-content')] cannot_enter_read_only
Wait Until Element Is Visible //div[@class="pf-c-code-editor pf-m-read-only odh-dashboard__code-editor"] timeout=10
Capture Page Screenshot
SeleniumLibrary.Set Selenium Implicit Wait ${orig wait}

Pipeline Should Be Listed
[Documentation] Checks a pipeline is listed in the DS Project details page
[Arguments] ${pipeline_name} ${pipeline_description}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Suite Teardown Pipelines Suite Teardown
# lower case because it will be the OpenShift project
${PRJ_BASE_TITLE}= dsp
${PRJ_DESCRIPTION}= ${PRJ_BASE_TITLE} is a test project for validating DS Pipelines feature
${PRJ_TITLE}= ${PRJ_BASE_TITLE}-${TEST_USER_3.USERNAME}
${PIPELINE_TEST_NAME}= ${PIPELINE_TEST_BASENAME}-${TEST_USER_3.USERNAME}
${DC_NAME}= ds-pipeline-conn
${PIPELINE_TEST_BASENAME}= iris
${PIPELINE_TEST_DESC}= test pipeline definition
Expand Down Expand Up @@ -41,6 +43,8 @@ Verify User Can Create, Run and Delete A DS Pipeline From DS Project Details Pag
... project_title=${PRJ_TITLE}
... filepath=${PIPELINE_TEST_FILEPATH}
... press_cancel=${FALSE}
Pipeline Context Menu Should Be Readonly pipeline_name=${PIPELINE_TEST_NAME}
Open Data Science Project Details Page ${PRJ_TITLE}
Pipeline Should Be Listed pipeline_name=${PIPELINE_TEST_NAME}
... pipeline_description=${PIPELINE_TEST_DESC}
Capture Page Screenshot
Expand Down Expand Up @@ -105,11 +109,8 @@ Verify Pipeline Metadata Pods Are Not Deployed When Running Pipelines
Pipelines Suite Setup # robocop: disable
[Documentation] Sets global test variables, create a DS project and a data connection
Set Library Search Order SeleniumLibrary
# TODO: Install Pipeline only if it does not already installed
Install Red Hat OpenShift Pipelines
${prj_title}= Set Variable ${PRJ_BASE_TITLE}-${TEST_USER_3.USERNAME}
${iris_pipeline_name}= Set Variable ${PIPELINE_TEST_BASENAME}-${TEST_USER_3.USERNAME}
Set Suite Variable ${PRJ_TITLE} ${prj_title}
Set Suite Variable ${PIPELINE_TEST_NAME} ${iris_pipeline_name}
${to_delete}= Create List ${PRJ_TITLE}
Set Suite Variable ${PROJECTS_TO_DELETE} ${to_delete}
Launch Data Science Project Main Page username=${TEST_USER_3.USERNAME}
Expand Down

0 comments on commit e7f73c4

Please sign in to comment.