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

[e2e tests] Improve execution time by disabling the welcomeGuide feature instead of waiting for the modal #45132

Merged
merged 13 commits into from Feb 28, 2024

Conversation

adimoldovan
Copy link
Contributor

@adimoldovan adimoldovan commented Feb 26, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

Every time the page or the post editor is visited the closeWelcomeModal function waits 5 seconds for the welcome tour modal to be displayed and closes it. Most of the times the modal is not even being displayed, as it was previously dismissed.

This PR adds a function to disable the modal by setting the welcomeGuide feature. It should save 5 seconds of most editor page visits.

I also removed some unnecessary waitFor('networkidle') calls that were slowing down the tests.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

Run all affected tests, they should pass.

pnpm test:e2e-pw ./tests/e2e-pw/tests/merchant/create-cart-block.spec.js ./tests/e2e-pw/tests/shopper/cart-block-calculate-shipping.spec.js ./tests/e2e-pw/tests/shopper/cart-block-coupons.spec.js ./tests/e2e-pw/tests/shopper/cart-block.spec.js ./tests/shopper/cart-checkout-block-calculate-tax.spec.js ./tests/e2e-pw/tests/shopper/mini-cart.spec.js ./tests/e2e-pw/tests/shopper/shop-products-filter-by-price.spec.js, ./tests/e2e-pw/tests/merchant/create-post.spec.js, ./tests/e2e-pw/tests/merchant/create-page.spec.js, ./tests/e2e-pw/tests/shopper/product-tags-attributes.spec.js

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Comment

@adimoldovan adimoldovan changed the title [e2e tests] improve execution time by disabling the welcomeGuide feature instead of waiting for the modal [e2e tests] Improve execution time by disabling the welcomeGuide feature instead of waiting for the modal Feb 26, 2024
@adimoldovan adimoldovan self-assigned this Feb 26, 2024
Copy link
Contributor

github-actions bot commented Feb 26, 2024

Test Results Summary

Commit SHA: a0fbc43

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 37s
E2E Tests306004103477m 30s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@adimoldovan adimoldovan marked this pull request as ready for review February 26, 2024 16:37
@woocommercebot woocommercebot requested a review from a team February 26, 2024 16:37
Copy link
Contributor

Hi , @woocommerce/vortex

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@github-actions github-actions bot added focus: e2e tests Issues related to e2e tests plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Feb 26, 2024
@adimoldovan adimoldovan marked this pull request as draft February 26, 2024 17:32
@adimoldovan adimoldovan removed the request for review from a team February 26, 2024 17:32
@rrennick
Copy link
Contributor

@adimoldovan This branch has merge conflicts.

@adimoldovan
Copy link
Contributor Author

Addressing here @rrennick's #45121 (comment) from #45121

Is there still some place in the E2E tests where the modal is being dismissed through the browser? The concern with completely eliminating this by setting a pref is that the modal itself is not longer tested in E2E.

With changes in this PR, unless I missed any, there shouldn't be any places left where the modal is being dismissed through the browser. I'm ok with that, because that modal is not a Woo feature, and not something critical we want to test.
And if we decide to test it, I would rather have a dedicated test to it.
I'm open to other approaches though.

@adimoldovan adimoldovan marked this pull request as ready for review February 27, 2024 11:19
@woocommercebot woocommercebot requested a review from a team February 27, 2024 11:19
Copy link
Contributor

@rrennick rrennick left a comment

Choose a reason for hiding this comment

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

because that modal is not a Woo feature, and not something critical we want to test.

Thanks for that clarification. This is a nice improvement.

@rrennick rrennick merged commit 63f6650 into trunk Feb 28, 2024
33 checks passed
@rrennick rrennick deleted the e2e/disable-editor-welcome-guide branch February 28, 2024 14:35
@github-actions github-actions bot added this to the 8.8.0 milestone Feb 28, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Feb 28, 2024
@alopezari alopezari added status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Feb 29, 2024
Konamiman pushed a commit that referenced this pull request Mar 13, 2024
…ure instead of waiting for the modal (#45132)

* Fix locator for command palette

* Add changelog

* Use fixtures instead of before/after hooks

* Disable welcome modal

* Remove describe block

* Replace closeWelcomeModal with disableWelcomeModal

* Remove wait for networkidle

* Wait for page load

* Add changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: e2e tests Issues related to e2e tests plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants