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

Conversation

FedeAlonso
Copy link
Contributor

@FedeAlonso FedeAlonso commented Jan 18, 2024

Test fixed:

ODS-1402: Verify Quick Starts Work When All Steps Are Skipped
ODS-1305: Verify External Links In Quick Starts Are Not Broken
ODS-489: Verify Filters Are Working On Resources Page
ODS-1661: Verify RHODS Accept Multiple Admin Groups And CRD Gets Updates
ODS-1680: Verify Unauthorized User Is Not Able To Spawn Jupyter Notebook
ODS-1686: Verify Automatically Detects a Group Selected Is Removed and Notify the User
ODS-1825: Verify User Can Create A S3 Data Connection And Connect It To Workbenches
ODS-1864: Verify User Can Create A Workbench With Environment Variables
ODS-1868: Verify User Can Access Only Its Owned Projects
ODS-2202: Verify User Can Modify And Revoke Access To DS Projects From Other Users
ODS-2208: Verify User Can Assign Access Permissions To User Groups

@FedeAlonso FedeAlonso added the do not merge Do not merge this yet please label Jan 18, 2024
Copy link
Contributor

github-actions bot commented Jan 18, 2024

Robot Results

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

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)

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)

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

Continuation marker should be aligned with starting row Warning test

Continuation marker should be aligned with starting row
@@ -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)
@@ -122,19 +122,13 @@
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)
ELSE IF "${add_key_value_text}" == "Add another variable"
Execute Javascript document.getElementsByClassName("pf-c-drawer__content")[1].scrollBy(0,700) # robocop: disable
END
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)
@@ -168,13 +162,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)
... ${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"]
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)
@FedeAlonso FedeAlonso changed the title Fix: Dashboard automation errors for 2.6 Fix: Dashboard automation errors for 2.6 pt1 Jan 22, 2024
@FedeAlonso FedeAlonso added needs testing Needs to be tested in Jenkins and removed do not merge Do not merge this yet please labels Jan 22, 2024
@FedeAlonso FedeAlonso marked this pull request as ready for review January 22, 2024 11:13
Comment on lines 133 to 137
IF "${add_key_value_text}" == "Add another key / value pair"
Execute Javascript document.getElementsByClassName("pf-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
END
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might be still needed in case of many env variables, try running ODS-2595 for example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not just deleting it, I'm navigating using the left bar menu, instead of usin js scripts

Copy link
Contributor

@bdattoma bdattoma Jan 23, 2024

Choose a reason for hiding this comment

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

I see that and it's correct, but it might not be enough when the variables are many. Pls try with ODS-2595

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added "do not merge" label until everything related with this is properly tested and or fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just using the navigation when creating multiple env vars does not work properly.
I've restored the script and modified it in order to make it work with the new UI

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bdattoma Can you please check the last changes? If you are OK with the new script I will merge this PR

Copy link
Contributor

Choose a reason for hiding this comment

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

I still see the script deleted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤦 my bad....
@bdattoma can you re review?

@jiridanek jiridanek added the enhancements Bugfixes, enhancements, refactoring, ... in tests or libraries (PR will be listed in release-notes) label Jan 23, 2024
@FedeAlonso
Copy link
Contributor Author

FedeAlonso commented Jan 24, 2024

Test execution results:

	              Total	Failed	Passed	Skipped	Pass %
Critical tests	0	0	0	0	100.0
All tests	12	0	12	0	100.0

rhods-smoke/4422/

bdattoma
bdattoma previously approved these changes Jan 24, 2024
jstourac
jstourac previously approved these changes Jan 24, 2024
@FedeAlonso FedeAlonso added the do not merge Do not merge this yet please label Jan 24, 2024
@FedeAlonso FedeAlonso added verified This PR has been tested with Jenkins and removed do not merge Do not merge this yet please labels Jan 24, 2024
@FedeAlonso FedeAlonso requested a review from bdattoma January 24, 2024 11:12
jiridanek
jiridanek previously approved these changes Jan 24, 2024
@FedeAlonso FedeAlonso removed the needs testing Needs to be tested in Jenkins label Jan 24, 2024
@FedeAlonso FedeAlonso dismissed stale reviews from jiridanek, bdattoma, and jstourac via 6a51b40 January 24, 2024 16:25
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

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

See analysis details on SonarCloud

@FedeAlonso FedeAlonso merged commit b63590e into red-hat-data-services:master Jan 24, 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.

4 participants