Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Dashboard automation errors for 2.6 pt1 #1132

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e842585
fix test ODS-1402: Verify Quick Starts Work When All Steps Are Skipped
FedeAlonso Jan 18, 2024
72b7379
fix test ODS-1305: Verify External Links In Quick Starts Are Not Broken
FedeAlonso Jan 18, 2024
7f1174a
fix test ODS-489: Verify Filters Are Working On Resources Page
FedeAlonso Jan 19, 2024
7e1de84
test ODS-1661: Verify RHODS Accept Multiple Admin Groups And CRD Gets…
FedeAlonso Jan 19, 2024
d5b6700
delete pf version from paths and validate ODS-1680
FedeAlonso Jan 19, 2024
8fb32d2
Merge branch 'master' of github.com:red-hat-data-services/ods-ci into…
FedeAlonso Jan 19, 2024
31cc673
test ODS-1686: Verify Automatically Detects a Group Selected Is Remov…
FedeAlonso Jan 19, 2024
9055c47
add logs to POST Dashboard API requests
FedeAlonso Jan 19, 2024
0300542
fix test ODS-1825: Verify User Can Create A S3 Data Connection And Co…
FedeAlonso Jan 19, 2024
bed81ef
fix test ODS-1864: Verify User Can Create A Workbench With Environmen…
FedeAlonso Jan 19, 2024
2d22a5a
Merge branch 'master' into fix/dashboard_tests_2_6
FedeAlonso Jan 19, 2024
7e8cb1e
Merge branch 'master' into fix/dashboard_tests_2_6
FedeAlonso Jan 22, 2024
bd87ff2
fix test ODS-2202: Verify User Can Access Only Its Owned Projects
FedeAlonso Jan 22, 2024
fad1461
Merge branch 'master' into fix/dashboard_tests_2_6
FedeAlonso Jan 23, 2024
173864a
Merge branch 'master' into fix/dashboard_tests_2_6
FedeAlonso Jan 23, 2024
3c149b5
close all browsers befor ODS-1868
FedeAlonso Jan 23, 2024
941767b
PR fixes
FedeAlonso Jan 23, 2024
197ee51
Merge branch 'master' into fix/dashboard_tests_2_6
FedeAlonso Jan 23, 2024
4fd3e59
Merge branch 'master' of github.com:red-hat-data-services/ods-ci into…
FedeAlonso Jan 23, 2024
ad4c545
Fix script issue
FedeAlonso Jan 24, 2024
6a51b40
Fix script issue
FedeAlonso Jan 24, 2024
2e4a115
Merge branch 'master' into fix/dashboard_tests_2_6
FedeAlonso Jan 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ Go To ${group_name} Group Page
Create Group
[Documentation] Creates a user group in OCP (if it doesn't exist)
[Arguments] ${group_name}
${res} ${output}= Run And Return Rc And Output
... oc adm groups new ${group_name} --dry-run=client -o yaml | kubectl apply --validate=false -f -
${res} ${output}= Run And Return Rc And Output
... oc adm groups new ${group_name} --dry-run=client -o yaml | oc apply --validate=false -f -
Should Be Equal As Integers ${res} 0 ${output}

Delete Group
[Documentation] Deletes a user group in OCP (if it exists)
[Arguments] ${group_name}
${res} ${output}= Run And Return Rc And Output
${res} ${output}= Run And Return Rc And Output
... oc delete group ${group_name} --ignore-not-found
Should Be Equal As Integers ${res} 0 ${output}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ${ODH_DASHBOARD_SIDEBAR_HEADER_ENABLE_BUTTON}= //*[@class="pf-v5-c-drawe
${ODH_DASHBOARD_SIDEBAR_HEADER_GET_STARTED_ELEMENT}= //*[@class="pf-v5-c-drawer__panel-main"]//*[.='Get started']
${CARDS_XP}= //*[(contains(@class, 'odh-card')) and (contains(@class, 'pf-v5-c-card'))]
${CARD_BUTTON_XP}= ..//input[@class="pf-v5-c-radio__input"][@name="odh-explore-selectable-card"]
${RES_CARDS_XP}= //article[contains(@class, 'pf-v5-c-card')]
${RES_CARDS_XP}= //div[contains(@data-ouia-component-type, "Card")]
${SAMPLE_APP_CARD_XP}= //*[@id="pachyderm-selectable-card-id"]
${HEADER_XP}= div[@class='pf-v5-c-card__header']
${TITLE_XP}= div[@class='pf-v5-c-card__title']//span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Open QuickStart Element in Resource Section By Name
[Documentation] It opens the element by enabling Quick Start filter in Resources Section of ODS Dashboard.
[Arguments] ${element}
Select Checkbox //input[@id="quickstart--check-box"]
Wait Until Page Contains Element ${RES_CARDS_XP}\[@id="${element}"]
Click Link ${RES_CARDS_XP}\[@id="${element}"]//a
Wait Until Page Contains ELement //div[@class="pf-c-drawer__panel-main"] 5
Wait Until Page Contains Element ${RES_CARDS_XP}\[@id="${element}"]//a[text()="Open"]
Click Link ${RES_CARDS_XP}\[@id="${element}"]//a[text()="Open"]
Wait Until Page Contains ELement //div[contains(@class, "-c-drawer__panel-main")] 5

Star QuickStart Tour
Click Button //button[@data-test="Start button"]
Expand All @@ -33,19 +33,19 @@ Get The Count Of QuickStart Steps

Link Text On QuickStart Card Should Be
[Arguments] ${element} ${exp_link_text}
Element Text Should Be ${RES_CARDS_XP}\[@id="${element}"]//a ${exp_link_text}
Element Text Should Be //div[@id="${element}"]//a ${exp_link_text}

QuickStart Status Should Be
[Documentation] Verifies the label on the item card which shows the progress and closes the sidebar.
[Arguments] ${element} ${progress_string}
IF '${progress_string}'=='In Progress'
Element Text Should Be ${RES_CARDS_XP}\[@id="${element}"]//span[@class="pf-c-label pf-m-purple pf-m-outline"]
Element Text Should Be //div[@id="${element}"]//span[contains(@class, "-c-label pf-m-purple pf-m-outline")]
... In Progress
ELSE IF '${progress_string}'=='Complete'
Element Text Should Be ${RES_CARDS_XP}\[@id="${element}"]//span[@class="pf-c-label pf-m-green pf-m-outline"]
Element Text Should Be //div[@id="${element}"]//span[@class="pf-c-label pf-m-green pf-m-outline"]
... Complete
ELSE IF '${progress_string}'=='Failed'
Element Text Should Be ${RES_CARDS_XP}\[@id="${element}"]//span[@class="pf-c-label pf-m-red pf-m-outline"]
Element Text Should Be //div[@id="${element}"]//span[@class="pf-c-label pf-m-red pf-m-outline"]
... Failed
END

Expand Down Expand Up @@ -221,7 +221,7 @@ Verify Links Are Not Broken For Each QuickStart
${quickStartCount}= Get Length ${quickStartElements}
${version_check}= Is RHODS Version Greater Or Equal Than 1.21.0
IF ${version_check}==True
${versioned_title_xp}= Set Variable //div[@class="pf-c-content"]
${versioned_title_xp}= Set Variable //div[contains(@class, "-c-content")]
ELSE
${versioned_title_xp}= Set Variable //div[@class="pf-c-card__title odh-card__doc-title"]
END
Expand All @@ -232,7 +232,7 @@ Verify Links Are Not Broken For Each QuickStart
${Title}= Split To Lines ${Title}
Log ${Title[${0}]} console=yes
Click Element ${quickStartElements[${counter}]}
Wait Until Element Is Visible //button[@class='pf-c-wizard__nav-link']
Wait Until Element Is Visible //button[contains(@class, "-c-wizard__nav-link")]
External URLs Should Not Be Broken
END

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

*** Variables ***
${TOLERATION_CHECKBOX}= //input[@id="tolerations-enabled-checkbox"]
${GROUP_BTN_XP}= (//*[@class="pf-c-chip-group"])//*[@class="pf-c-chip__text" ]//following-sibling::button[1]
${GROUP_BTN_XP}= //button[@data-ouia-component-id="Remove"]
${SINGLE_MODE_SERVING_CHECK_BOX}= //input[@id="single-model-serving-platform-enabled-checkbox"]
${MULTI_MODE_SERVING_CHECK_BOX}= //input[@id="multi-model-serving-platform-enabled-checkbox"]
${CUSTOM_EMPTY_GROUP}= empty-group
Expand All @@ -16,25 +16,25 @@
Add OpenShift Groups To Data Science Administrators
[Documentation] Add OpenShift Groups to Data Science administrators From RHODS Dashboard
[Arguments] @{admin_groups}
Click Button (//button[@class="pf-c-button pf-c-select__toggle-button pf-m-plain"])[${1}]
Click Button (//button[@aria-label="Options menu"])[${1}]
FOR ${admin_group} IN @{admin_groups}
${present}= Run Keyword And Return Status Element Should Be Visible //*[@class="pf-c-select__menu-item pf-m-selected" and contains(text(), "${admin_group}")]
${present}= Run Keyword And Return Status Element Should Be Visible //button[@role="option" and text()="${admin_group}" and @aria-selected="true"]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (165/120)
IF ${present} != True
Click Button //*[@class="pf-c-select__menu-item"and contains(text(), "${admin_group}")]
Click Button //button[@role="option" and text()="${admin_group}"]
END
END
Press Keys None ESC

Add OpenShift Groups To Data Science User Groups
[Documentation] Add OpenShift Groups to Data Science User From RHODS Dashboard
[Arguments] @{user_groups}
Click Button (//button[@class="pf-c-button pf-c-select__toggle-button pf-m-plain"])[${2}]
Click Button (//button[@aria-label="Options menu"])[${2}]

FOR ${user_group} IN @{user_groups}
${present}= Run Keyword And Return Status
... Element Should Be Visible //*[@class="pf-c-select__menu-item pf-m-selected" and contains(text(), "${user_group}")]
... Element Should Be Visible //button[@role="option" and text()="${user_group}" and @aria-selected="true"]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (125/120)

Check warning

Code scanning / Robocop

Continuation marker should be aligned with starting row Warning test

Continuation marker should be aligned with starting row
IF ${present} != True
Click Element //*[@class="pf-c-select__menu-item"and contains(text(), "${user_group}")]
Click Element //button[@role="option" and text()="${user_group}"]
END
END
Press Keys None ESC
Expand All @@ -48,7 +48,7 @@
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize jupyterhub service account
Menu.Navigate To Page Settings User management
Wait Until Element Is Visible //*[@class="pf-c-button pf-c-select__toggle-button pf-m-plain"] timeout=20
Wait Until Element Is Visible //button[@aria-label="Options menu"] timeout=20

Remove OpenShift Groups From Data Science User Groups
[Documentation] Remove OpenShift Groups From Data Science User Groups From Dashboard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ${DC_ADD_BTN_2_XP}= xpath=//footer/button[.="Add data connection"]
${S3_BUCKET_DC_INPUT_XP}= xpath=//input[@aria-label="Field list AWS_S3_BUCKET"]
${S3_DC_ADD_BTN}= xpath=//footer/button[.="Add data connection"]
${S3_DC_EDIT_BTN}= xpath=//footer/button[.="Update data connection"]
${DC_WORKBENCH_SELECTOR_XP}= xpath=//div[contains(@class,"modal")]//div[contains(@class,"pf-c-select")]/ul/li
${DC_WORKBENCH_SELECTOR_XP}= xpath=//ul[@aria-label="Notebook select"]/li


*** Keywords ***
Expand Down Expand Up @@ -133,7 +133,7 @@ Fill Data Connection Form
Log msg=you are not connecting any workbenchs to ${dc_name} DataConnection
ELSE
Run Keyword And Continue On Failure
... Element Should Be Enabled xpath=//div[contains(@class,"modal")]//div[contains(@class,"pf-c-select")]
... Element Should Be Enabled xpath=//div[contains(@class,"modal")]//button[@aria-label="Options menu"]
FOR ${workbench_title} IN @{connected_workbench}
Set Connection Between Data Connection And Workbench ${workbench_title}
Run Keyword And Continue On Failure Element Should Be Enabled ${S3_DC_ADD_BTN}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Assign ${permission_type} Permissions To User ${username} in Project ${project_t
Open Data Science Project Details Page ${project_title}
Move To Tab Permissions
Assign ${permission_type} Permissions To User ${username}

Change ${username} Permissions To ${permission_type}
[Documentation] Change the level of permission ${permission_type} for the given user ${username}
... in the currently open DS Project in UI
Expand Down Expand Up @@ -71,9 +71,9 @@ Assign ${permission_type} Permissions To Group ${group_name}
Click Action From Actions Menu
[Documentation] Click an action from Actions menu (3-dots menu on the right)
[Arguments] ${username} ${action}
Click Element xpath=//tr[td[@data-label="Username"]//*[text()="${username}"]]/td[contains(@class,"pf-c-table__action")]/div/button[@aria-label="Actions"] # robocop: disable
Wait Until Page Contains Element xpath=//tr[td[@data-label="Username"]//*[text()="${username}"]]/td[contains(@class,"pf-c-table__action")]/div/ul/li/button[text()="${action}"] # robocop: disable
Click Element xpath=//tr[td[@data-label="Username"]//*[text()="${username}"]]/td[contains(@class,"pf-c-table__action")]/div/ul/li/button[text()="${action}"] # robocop: disable
Click Element xpath=//tr[td[@data-label="Username"]//*[text()="${username}"]]//button[@aria-label="Kebab toggle"] # robocop: disable
Wait Until Page Contains Element xpath=//tr[td[@data-label="Username"]//*[text()="${username}"]]//button[@aria-label="Kebab toggle"]/following-sibling::div//li/button/span/span[text()="${action}"] # robocop: disable
Click Element xpath=//tr[td[@data-label="Username"]//*[text()="${username}"]]//button[@aria-label="Kebab toggle"]/following-sibling::div//li/button/span/span[text()="${action}"] # robocop: disable

Get OpenShift RoleBinding
[Documentation] Fetch the RoleBinding object defining the level of permission of a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,18 @@
Log ${pair_idx}-${key}-${value}
Run Keyword And Continue On Failure Wait Until Page Contains Element
... xpath=//input[@aria-label="key of item ${pair_idx}"]
Input Text ${ENV_VARIABLES_SECTION_XP}/div[@class="pf-l-split"][${idx}]//input[@aria-label="key of item ${pair_idx}"]
Input Text ${ENV_VARIABLES_SECTION_XP}/div[contains(@class, "-l-split")][${idx}]//input[@aria-label="key of item ${pair_idx}"]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (145/120)
... ${key}
Input Text ${ENV_VARIABLES_SECTION_XP}/div[@class="pf-l-split"][${idx}]//input[@aria-label="value of item ${pair_idx}"]
Input Text ${ENV_VARIABLES_SECTION_XP}/div[contains(@class, "-l-split")][${idx}]//input[@aria-label="value of item ${pair_idx}"]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (147/120)
... ${value}
IF ${n_pairs}-${pair_idx} > 1
Click Element ${ENV_VARIABLES_SECTION_XP}/div[@class="pf-l-split"][${idx}]//button[text()="${add_key_value_text}"]
Click Element ${ENV_VARIABLES_SECTION_XP}/div[contains(@class, "-l-split")][${idx}]//button[text()="${add_key_value_text}"]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (146/120)
# The element we want to click might get pushed out of view on every loop, let's scroll by an approx
# amount of pixels for the block of elements that gets added.
IF "${add_key_value_text}" == "Add another key / value pair"
Execute Javascript document.getElementsByClassName("pf-c-drawer__content")[1].scrollBy(0,500) # robocop: disable
Execute Javascript document.getElementsByClassName("pf-v5-c-drawer__content")[1].scrollBy(0,500) # robocop: disable
ELSE IF "${add_key_value_text}" == "Add another variable"
Execute Javascript document.getElementsByClassName("pf-c-drawer__content")[1].scrollBy(0,700) # robocop: disable
Execute Javascript document.getElementsByClassName("pf-v5-c-drawer__content")[1].scrollBy(0,700) # robocop: disable
END
END
END
Expand Down Expand Up @@ -168,13 +168,13 @@
[Documentation] Selects the type of environment variable in the workbench creation page: Secret vs Config Map
[Arguments] ${k8s_type} ${input_type} ${variable_index}
Run Keyword And Continue On Failure Wait Until Page Contains Element
... ${ENV_VARIABLES_SECTION_XP}/div[@class="pf-l-split"][${variable_index}]//div[@class="pf-l-stack__item"]/div[contains(@class,"pf-c-select")]/button
Click Element ${ENV_VARIABLES_SECTION_XP}/div[@class="pf-l-split"][${variable_index}]//div[contains(@class,"pf-c-select")]/button
... ${ENV_VARIABLES_SECTION_XP}/div[contains(@class, "-l-split")][${variable_index}]//button[@aria-label="Options menu"]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (127/120)
Click Element ${ENV_VARIABLES_SECTION_XP}/div[contains(@class, "-l-split")][${variable_index}]//button[@aria-label="Options menu"]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (137/120)
Wait Until Page Contains Element xpath=//ul[@role="listbox"]/li/button[text()="${k8s_type}"]
Click Element xpath=//ul[@role="listbox"]/li/button[text()="${k8s_type}"]
Run Keyword And Continue On Failure
... Wait Until Page Contains Element ${ENV_VARIABLES_SECTION_XP}//button[div/span[text()="Select one"]]
Click Element ${ENV_VARIABLES_SECTION_XP}/div[@class="pf-l-split"][${variable_index}]//button[div/span[text()="Select one"]]
Click Element ${ENV_VARIABLES_SECTION_XP}/div[contains(@class, "-l-split")][${variable_index}]//button[div/span[text()="Select one"]]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (140/120)
Wait Until Page Contains Element xpath=//ul[@role="listbox"]/li/button[text()="${input_type}"]
Click Element xpath=//ul[@role="listbox"]/li/button[text()="${input_type}"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
[Arguments] ${expected_number}
${version_check}= Is RHODS Version Greater Or Equal Than 1.21.0
IF ${version_check}==True
${versioned_title_xp}= Set Variable //div[@class="pf-c-card__title"]/div[@class="pf-c-content"]
${versioned_title_xp}= Set Variable //div[contains(@class, "-c-card__title")]//div[contains(@class, "-c-content")]

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (128/120)
ELSE
${versioned_title_xp}= Set Variable //div[@class="pf-c-card__title odh-card__doc-title"]
END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,11 @@ Verify User Can Delete A Data Science Project

Verify User Can Access Only Its Owned Projects
[Tags] Sanity Tier1 ODS-1868
[Documentation] Verifies each user can access only thei owned projects. Except for
[Documentation] Verifies each user can access only they owned projects. Except for
... cluster and dedicated admins which should be able to fetch all the DS Projects
[Setup] Run Keywords
... SeleniumLibrary.Close All Browsers
... AND
... Set Variables For User Access Test
... AND
... Delete Data Science Project From CLI displayed_name=${PRJ_TITLE}
Expand Down
Loading