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

Stabilize Dashboard Test Suite (415) #1235

Merged
merged 6 commits into from
Mar 4, 2024

Conversation

manosnoam
Copy link
Contributor

@manosnoam manosnoam commented Feb 29, 2024

Fix known Automation bugs and general stability of Dashboard Suite:
415__ods_dashboard_projects.robot.

It also includes fixes to the Storages, Workbenches and Projects resources that are being used by this suite:

  • Create PersistentVolume Storage option to update existing PVC
  • Fix supported mount name to lower case and dashes only
  • Workbench Should Be Listed with timeout option
  • Fix Select Existing Data Connection in Workbench
  • Wait for RHODS Dashboard to Load with retry logic to reload cards
  • Wait Until Project Is Open first waits for spinner ball to disappear
  • Open Workbench waits for workbench link, before clicking it
  • Increase timeout waiting to switch to/from JupyterLab console
  • New Storage KW: Delete All PVC In Project From CLI
  • New Common KW: Get All Text Under Element
  • New Common KW: Get All Strings That Contain
  • Removed All Tags of Product/Automation Bugs (All Suite Tests Passed)
  • Append to Suite 415: Test Tags Dashboard

All 23 Test cases (including Smoke, Sanity and Tier1) passed:

image

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robocop found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link
Contributor

github-actions bot commented Feb 29, 2024

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
429 0 0 429 100

... prj_title=${PRJ_TITLE} image_name=${NB_IMAGE} deployment_size=Small
... storage=Persistent pv_existent=${NONE}
... pv_name=${NONE} pv_description=${NONE} pv_size=${NONE}
${workbenches}= Create List ${WORKBENCH_TITLE}

Check notice

Code scanning / Robocop

{{ create_keyword }} can be replaced with VAR Note test

Create List can be replaced with VAR
@@ -276,7 +278,7 @@
# The Workbench and the Data connection appear on the project details page.
Workbench Should Be Listed workbench_title=${WORKBENCH_TITLE}
# The data connection has the workbench name in the "Connected workbenches" column
${workbenches}= Create Dictionary ${WORKBENCH_TITLE}=mount-data
${workbenches}= Create List ${WORKBENCH_TITLE}

Check notice

Code scanning / Robocop

{{ create_keyword }} can be replaced with VAR Note test

Create List can be replaced with VAR
# The returned list can be evaluated with keyword: Should Contain ${text_list} Text Data
[Arguments] ${parent_element}
${elements}= Get WebElements ${parent_element}
${text_list}= Create List

Check notice

Code scanning / Robocop

{{ create_keyword }} can be replaced with VAR Note test

Create List can be replaced with VAR
RETURN ${text_list}

Get All Strings That Contain
[Documentation] Returns new list of strings, for each item in ${list_of_strings} that contains ${substring_to_search}

Check warning

Code scanning / Robocop

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

Line is too long (124/120)
Get All Strings That Contain
[Documentation] Returns new list of strings, for each item in ${list_of_strings} that contains ${substring_to_search}
[Arguments] ${list_of_strings} ${substring_to_search}
${matched_list}= Create List

Check notice

Code scanning / Robocop

{{ create_keyword }} can be replaced with VAR Note test

Create List can be replaced with VAR
@manosnoam
Copy link
Contributor Author

Verified on local IDE as well as on rhods-ci-pr-test/2533, by running all of our smoke + 'Dashboard" tag tests

IF ${oauth_prompt_visible} Click Button Log in with OpenShift
${login-required} = Is OpenShift Login Visible
${login-required}= Is OpenShift Login Visible

Check notice

Code scanning / Robocop

Use underscore in variable name '{{ variable_name }}' instead of hyphens to avoid treating them like minus sign Note test

Use underscore in variable name '${login-required}=' instead of hyphens to avoid treating them like minus sign
IF ${login-required} Login To Openshift ${ocp_user_name} ${ocp_user_pw} ${ocp_user_auth_type}
${authorize_service_account} = Is rhods-dashboard Service Account Authorization Required
${authorize_service_account}= Is rhods-dashboard Service Account Authorization Required

Check warning

Code scanning / Robocop

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

Keyword name 'Is rhods-dashboard Service Account Authorization Required' does not follow case convention
... xpath://td[@data-label="Name"]/div/div/div[.="${image_name} "]/../../../../td[@data-label="Description" and .="${expected_description}"] # robocop: disable
IF ${exists}==False
${desc} = Get Text xpath://td[@data-label="Name"]/div/div/div[.="${image_name} "]/../../../../td[@data-label="Description"]
${desc}= Get Text xpath://td[@data-label="Name"]/div/div/div[.="${image_name} "]/../../../../td[@data-label="Description"]

Check warning

Code scanning / Robocop

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

Line is too long (132/120)
@@ -782,7 +785,7 @@

Get Links From Switcher
[Documentation] Returns the OpenShift Console and OpenShift Cluster Manager Link
${list_of_links} = Create List
${list_of_links}= Create List

Check notice

Code scanning / Robocop

{{ create_keyword }} can be replaced with VAR Note test

Create List can be replaced with VAR
@@ -256,8 +258,10 @@

Wait Until Cards Are Loaded
[Documentation] Waits until the Application cards are displayed in the page
Run Keyword And Continue On Failure Wait Until Page Contains Element
... xpath:${CARDS_XP} timeout=15s error="This might be caused by bug RHOAIENG-404"
${status}= Run Keyword and Return Status Wait Until Page Contains Element

Check warning

Code scanning / Robocop

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

Keyword name 'Run Keyword and Return Status' does not follow case convention
Fix known Automation bugs and general stability of Dashboard Suite 415.

It also includes fixes to Keywords in Storages, Workbenches and Projects
resources, that are being used by this suite:
- `Create PersistentVolume Storage` option to update existing PVC
- Fix supported mount name with to lower case and dashes only
- `Workbench Should Be Listed` with timeout option
- Fix `Select Existing Data Connection` in Workbench
- `Wait Until Project Is Open` first waits for spinner ball to disappear
- `Open Workbench` waits for workbench link, before clicking it
- `Verify Cluster Settings Is Available` by `data-testid`
- Increase timeout waiting to switch to/from JupyterLab console
- New Storage KW: `Delete All PVC In Project From CLI`
- New Common KW: `Get All Text Under Element`
- New Common KW: `Get All Strings That Contain`
- Removed All Tags of Product/Automation Bugs (All Suite Tests Passed)
- Append to Suite 415: `Test Tags   Dashboard`

Signed-off-by: manosnoam <[email protected]>
Signed-off-by: manosnoam <[email protected]>
@manosnoam
Copy link
Contributor Author

@bdattoma I fixed/answered all of your suggestions, and rerun the whole suite (including sanity and tier1) + smoke of rhods-ci-pr-test/2537 - All tests passed!

image

@manosnoam manosnoam added verified This PR has been tested with Jenkins enhancements Bugfixes, enhancements, refactoring, ... in tests or libraries (PR will be listed in release-notes) labels Feb 29, 2024
Copy link
Member

@jstourac jstourac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Noam. I had a very brief look and LGTM.

Copy link

sonarcloud bot commented Mar 3, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@manosnoam manosnoam merged commit 8910a4d into red-hat-data-services:master Mar 4, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancements Bugfixes, enhancements, refactoring, ... in tests or libraries (PR will be listed in release-notes) verified This PR has been tested with Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants