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

Add e2e tests to verify block templates can be customized if the theme has its own custom templates #43650

Merged
merged 17 commits into from Jan 18, 2024

Conversation

Aljullu
Copy link
Contributor

@Aljullu Aljullu commented Jan 15, 2024

Changes proposed in this Pull Request:

This PR:

  1. Creates a new Playwright test environment so we run tests in a block theme with custom templates.
  2. In that environment, it adds a test for each template to verify they can be customized.
  3. It updates some package.json scripts and some docs that were not up to date.
  4. Removes plugins/woocommerce-blocks/.github/workflows/playwright.yml, as I understand, that file has been superseded by .github/workflows/blocks-playwright.yml.

Part of #43416.

How to test the changes in this Pull Request:

Note: no need to test this for the release.

  1. Verify e2e tests pass and there is a job specific for tests run in a block theme with templates.
  2. Locally run npm run test:e2e:side-effects, npm run test:e2e:side-effects:report, npm run test:e2e:classic-theme, npm run test:e2e:classic-theme:report, npm run test:e2e:block-theme-with-templates and npm run test:e2e:block-theme-with-templates:report and verify all of them work (the report ones should open the report in your browser once finished).
  3. Read the updated docs and verify they make sense.

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

Add e2e tests to verify block templates can be customized if the theme has its own custom templates.

@Aljullu Aljullu added focus: template Issue related to WooCommerce templates. focus: e2e tests Issues related to e2e tests labels Jan 15, 2024
@Aljullu Aljullu self-assigned this Jan 15, 2024
Copy link
Contributor

github-actions bot commented Jan 15, 2024

Test Results Summary

Commit SHA: af23dd2

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

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.

@Aljullu Aljullu force-pushed the add/theme-block-template-customization branch from 2856b12 to 00c77e2 Compare January 15, 2024 13:11
@github-actions github-actions bot added plugin: woocommerce Issues related to the WooCommerce Core plugin. and removed focus: e2e tests Issues related to e2e tests labels Jan 15, 2024
@Aljullu Aljullu marked this pull request as ready for review January 15, 2024 15:19
@woocommercebot woocommercebot requested review from a team and imanish003 and removed request for a team January 15, 2024 15:19
Copy link
Contributor

Hi @imanish003,

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

1 similar comment
Copy link
Contributor

Hi @imanish003,

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

@imanish003 imanish003 left a comment

Choose a reason for hiding this comment

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

Thank you for adding E2E tests for the theme with custom templates 🙌🏻.

I've tested them locally and everything passed on my end. I've left a few minor suggestions in the review. Please feel free to overlook any nitpicks that don't resonate with you. However, there's one change regarding the “Hello World in the template” string that I believe is necessary.

Additionally, I'm not sure why, but when I run npm run test:e2e:side-effects, it seems to execute all tests, which is puzzling. Are you experiencing the same issue?

@Aljullu
Copy link
Contributor Author

Aljullu commented Jan 16, 2024

Thanks for all the useful suggestions, @imanish003! I implemented most of the changes, so this is ready for another review.

Copy link
Contributor

@imanish003 imanish003 left a comment

Choose a reason for hiding this comment

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

Thank you so much for quickly making the changes. I've left one minor comment, but I'm pre-approving the PR. Everything else looks great 🚀

@Aljullu Aljullu merged commit 6c3f8cb into trunk Jan 18, 2024
43 checks passed
@Aljullu Aljullu deleted the add/theme-block-template-customization branch January 18, 2024 10:39
@github-actions github-actions bot added this to the 8.6.0 milestone Jan 18, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Jan 18, 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 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: template Issue related to WooCommerce templates. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris team: Kirigami & Origami
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants