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] Add downloadable product test #44112

Merged
merged 20 commits into from Jan 31, 2024

Conversation

adimoldovan
Copy link
Contributor

@adimoldovan adimoldovan commented Jan 26, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

Closes https://github.com/woocommerce/woocommerce-quality/issues/612 .

Cover the add downloadable product flow.

Changes:

  • renamed the create-simple-product.spec.js spec file to product-create-simple.spec.js to be consistent with the pattern product-<action> used by most spec files (also updated the docs/quality-and-best-practices/core-critical-flows.md doc as an effect).
  • I used a for loop to merge the resulting 3 tests into a single parametrised test function to reduce code duplication. My first intention was to have 3 tests and extract the common parts into functions, but I think in the end this version is cleaner and more readable.
  • With merging all tests into one function I added some extra checks for the virtual and non-virtual products.
  • I also enabled the fullPage option for screenshots.

How to test the changes in this Pull Request:

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

Run the spec locally with pnpm end:restart && pnpm test:e2e-pw ./tests/e2e-pw/tests/merchant/product-create-simple.spec.js

⚠️ The MarkdownLint on PR / lint check is failing because I updated a doc file and the check asks for an update of the docs-manifest, but this is not required for updates of content only.

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. labels Jan 26, 2024
@adimoldovan adimoldovan self-assigned this Jan 26, 2024
Copy link
Contributor

github-actions bot commented Jan 26, 2024

Test Results Summary

Commit SHA: 1745bdc

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

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 January 29, 2024 11:20
@adimoldovan adimoldovan requested review from a team January 29, 2024 11:20
Copy link
Contributor

github-actions bot commented Jan 29, 2024

Hi , @woocommerce/solaris, @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

@rrennick
Copy link
Contributor

@adimoldovan When you change .md files in the docs folder you need to update the docs manifest. Run the following in the root of the repository:

pnpm utils md-docs docs woocommerce -o docs/docs-manifest.json

@adimoldovan
Copy link
Contributor Author

@adimoldovan When you change .md files in the docs folder you need to update the docs manifest. Run the following in the root of the repository:

pnpm utils md-docs docs woocommerce -o docs/docs-manifest.json

Hi @rrennick, I wanted to generate the manifest when I saw the failed job, but according to the contributing-docs I don't have to: You don't need to regenerate the manifest if you only make changes to a page's content. My PR only updates the content of a page. Do I still need to regenerate the manifest?

@rrennick
Copy link
Contributor

You don't need to regenerate the manifest if you only make changes to a page's content.

That's an error in the instructions. We should have those updated later this week.

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.

LGTM

@adimoldovan adimoldovan merged commit 6210124 into trunk Jan 31, 2024
30 checks passed
@adimoldovan adimoldovan deleted the e2e/add/downloadable-product-test branch January 31, 2024 15:51
@github-actions github-actions bot added this to the 8.7.0 milestone Jan 31, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Jan 31, 2024
@nigeljamesstevenson nigeljamesstevenson 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 Jan 31, 2024
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