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

Re-enable skipped Woo signup test and update woocommerce.com URL #98246

Merged
merged 5 commits into from
Jan 14, 2025

Conversation

chihsuan
Copy link
Member

@chihsuan chihsuan commented Jan 13, 2025

Related to p1736297762145419-slack-C01SFMVEYAK

We disabled the Woo signup test in #98057 because it was failing and blocking the release.

The error occurs because the page navigation is being interrupted during the account activation step.

Navigation to "https://public-api.wordpress.com/bar/..." is interrupted by another navigation to "https://woocommerce.com/?error=access-denied"

Two navigation were happening at the same time because we didn't wait for the previous navigation to complete.

We have two points in the Slack thread but I believe it's not related to the error:

  • It's expected that the test user will be redirected to https://woocommerce.com/?error=access-denied because when the user signs up and is redirected back to WCCOM, WCCOM will check a URL parameter state to see if it is through WooCommerce.com to Wordpress.com signup flow. If not, it will redirect to https://woocommerce.com/?error=access-denied. Our e2e test entry point is directly to the Wordpress.com signup URL instead of to WooCommerce.com because I think the e2e test shouldn't depend on external services like WCCOM.
  • We changed the activation button text to Confirm your email. However, the e2e test is using the href to match the link instead of the text.

To fix the test, I added a waitUntil: 'networkidle' option to waitForURL and page.goto() calls. This should make the test more reliable. Additionally, I updated the URL in the e2e test from woo.com to woocommerce.com since we've already moved back to woocommerce.com.

Proposed Changes

  • Updated the URL in the e2e test from woo.com to woocommerce.com since we've already moved back to woocommerce.com
  • Re-enable the Woo signup test

Why are these changes being made?

  • It's important to have the Woo signup test to make sure the WooCommerce.com signup flow is working as expected.

Testing Instructions

Pre-Release E2E Tests should pass

To test locally:

  • yarn workspace wp-e2e-tests test test/e2e/specs/onboarding/signup__woo-email.ts
  • yarn workspace wp-e2e-tests test -- test/e2e/specs/authentication/authentication__totp.ts
  • Run tests a couple of times to see if it's flaky

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

…on test

- Updated the URL pattern in the UserSignupPage to correctly match 'woocommerce.com'.
- Changed the 'Activate account' test from skipped to active, allowing it to run as part of the onboarding flow.
@chihsuan chihsuan self-assigned this Jan 13, 2025
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@chihsuan chihsuan requested review from a team, psealock and adrianduffell January 13, 2025 04:14
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jan 13, 2025
@chihsuan chihsuan requested a review from bluefuton January 13, 2025 04:15
Copy link
Contributor

@rjchow rjchow left a comment

Choose a reason for hiding this comment

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

This LGTM but teamcity says it's flaky (?) I couldn't find any failures on the teamcity log however. The tooltip for "flaky" says "Different test status for multiple invocations in the same build".

I'm wondering if it's just outdated status?

image

@chihsuan
Copy link
Member Author

This LGTM but teamcity says it's flaky (?) I couldn't find any failures on the teamcity log however. The tooltip for "flaky" says "Different test status for multiple invocations in the same build".

I'm wondering if it's just outdated status?

Yeah, I believe it uses the historical data to determine if it's flaky.

Copy link
Contributor

@rjchow rjchow left a comment

Choose a reason for hiding this comment

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

In that case, lgtm! 🚀

@chihsuan chihsuan merged commit 6234e33 into trunk Jan 14, 2025
23 of 25 checks passed
@chihsuan chihsuan deleted the fix/woo-e2e branch January 14, 2025 02:16
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants