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

Explicitly clear out customers before testing #45229

Merged
merged 1 commit into from Mar 1, 2024

Conversation

lanej0
Copy link
Contributor

@lanej0 lanej0 commented Feb 29, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

Fixes the e2e failure that we're seeing on the "On PR merge" workflow. This explicitly clears out any existing customers before running the customer list tests.

How to test the changes in this Pull Request:

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

  1. Ensure CI passes

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

@github-actions github-actions bot added focus: e2e tests Issues related to e2e tests plugin: woocommerce Issues related to the WooCommerce Core plugin. tool: monorepo infrastructure Issues and PRs related to monorepo tooling. labels Feb 29, 2024
@woocommercebot woocommercebot requested a review from a team February 29, 2024 21:54
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

Copy link
Contributor

Test Results Summary

Commit SHA: c31b3e5

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

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.

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.

@lanej0 This looks good except for that one question.

await api.get( 'customers' ).then( ( response ) => {
oldCustomers = response.data;
} );
await api.post( `customers/batch`, {
Copy link
Contributor

Choose a reason for hiding this comment

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

Will it create an api error if oldCustomers is empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, I tested it locally on my machine where there are no customers and no error is thrown. So it works either way.

Copy link
Contributor

@adimoldovan adimoldovan left a comment

Choose a reason for hiding this comment

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

Nice, I like the approach. 👍🏼

@adimoldovan adimoldovan merged commit 0cb1782 into trunk Mar 1, 2024
36 checks passed
@adimoldovan adimoldovan deleted the fix/customer-test-pr-merge branch March 1, 2024 13:03
@github-actions github-actions bot added this to the 8.8.0 milestone Mar 1, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Mar 1, 2024
@alvarothomas alvarothomas 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 Mar 1, 2024
Konamiman pushed a commit that referenced this pull request Mar 13, 2024
Co-authored-by: Jon Lane <jon.lane@automattic.com>
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 tool: monorepo infrastructure Issues and PRs related to monorepo tooling.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants