Skip to content

Fixed dashboard cypress tests #8892

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

Merged

Conversation

GilbertCherrie
Copy link
Member

@GilbertCherrie GilbertCherrie commented Aug 10, 2023

Once simulate_queue_worker is enabled for cypress tests the dashboard widgets get more buttons which breaks the current tests. @Fryguy Once we enable simulate_queue_worker in the github actions environment then we should merge this pr to fix the dashboard tests.
The new buttons added to the widget "Full Screen" and "Print or export to PDF" can't be tested as far as I am aware. This is because both of these buttons open a page in a new tab and Cypress does not support testing in other tabs. There is ways to override a link from opening in a new tab when using the html element but since we are using buttons that open a new tab we can't override this behaviour.

@miq-bot
Copy link
Member

miq-bot commented Aug 10, 2023

Checked commit GilbertCherrie@982cb9c with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint
0 files checked, 0 offenses detected
Everything looks fine. 🍰

Copy link
Member

@Fryguy Fryguy left a comment

Choose a reason for hiding this comment

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

Looks good - will wait until we get in the simulate_queue_worker change. (Though it is curious that the UI changes at all whether workers are running or not - we should investigate that separately)

@GilbertCherrie
Copy link
Member Author

Looks good - will wait until we get in the simulate_queue_worker change. (Though it is curious that the UI changes at all whether workers are running or not - we should investigate that separately)

This has to do with this screen which requires the simulate_queue_worker to generate the report preview.
Screenshot 2023-08-14 at 7 48 02 AM

Also for the dashboard once it runs simulate_queue_worker it updates the widgets from empty widgets to chart / table widgets that contain no data but have slightly different actions in the widget toolbar buttons.

@jeffibm
Copy link
Member

jeffibm commented Nov 6, 2023

Hey @Fryguy , and @GilbertCherrie , can we merge this?

@GilbertCherrie
Copy link
Member Author

@jeffibm No we can't merge this yet as it relies on simulate_queue_worker to be enabled in the cypress environment or else these tests will fail.

@miq-bot
Copy link
Member

miq-bot commented Feb 19, 2024

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

@miq-bot miq-bot added the stale label Feb 19, 2024
@miq-bot
Copy link
Member

miq-bot commented May 20, 2024

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

@Fryguy Fryguy added the blocked label Aug 5, 2024
@miq-bot
Copy link
Member

miq-bot commented Nov 11, 2024

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

1 similar comment
@miq-bot
Copy link
Member

miq-bot commented Feb 17, 2025

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

@Fryguy
Copy link
Member

Fryguy commented Mar 26, 2025

@GilbertCherrie As discussed, let's introduce an ENV var about whether simulate_queue_worker is present. Then we can merge this, and mark it as not yet present in GitHub Actions, but locally users can still run it.

@GilbertCherrie GilbertCherrie force-pushed the fix_dashboard_cypress_tests branch from 982cb9c to 451e95b Compare May 23, 2025 17:19
@Fryguy
Copy link
Member

Fryguy commented May 23, 2025

@jrafanie Please review.

@jrafanie
Copy link
Member

Merging, we now run with simulated worker: https://github.com/ManageIQ/manageiq-ui-classic/blob/master/Rakefile#L102

I would like rebase and get PR testing with cypress enabled in #9452

@jrafanie jrafanie merged commit 50907f6 into ManageIQ:master May 27, 2025
15 checks passed
@GilbertCherrie GilbertCherrie deleted the fix_dashboard_cypress_tests branch May 27, 2025 17:03
@Fryguy
Copy link
Member

Fryguy commented May 28, 2025

Backported to spassky in commit 7112399.

commit 7112399b383fafe80588d50dad17918474f1d232
Author: Joe Rafaniello <[email protected]>
Date:   Tue May 27 06:41:36 2025 -0700

    Merge pull request #8892 from GilbertCherrie/fix_dashboard_cypress_tests
    
    Fixed dashboard cypress tests
    
    (cherry picked from commit 50907f6052fc8f8384dbed44f8fce3b2d3f5487a)

Fryguy pushed a commit that referenced this pull request May 28, 2025
Fixed dashboard cypress tests

(cherry picked from commit 50907f6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants