e28b0aa9ea
* Filter product collection variations by 'block' scope This commit updates the product collection feature to only show variations with the 'block' scope in the collection chooser. To achieve this: 1. Added 'block' to the scope array for various product collection variations (best-sellers, featured, hand-picked, new arrivals, on-sale, related, top-rated, and upsells). 2. Modified the collection chooser logic to filter variations based on the 'block' scope. * Product Collection: Hide collection chooser toolbar for non-block scoped collections This commit modifies the ToolbarControls component in the Product Collection block to conditionally render the CollectionChooserToolbar. The toolbar is now only displayed for collections with a scope that includes 'block'. * Add scope property to product collections in E2E tests This commit adds the 'scope' property to all registered product collections in the E2E test plugin. The 'scope' is set to ['block'] for each collection. * Add changefile(s) from automation for the following project(s): woocommerce-blocks * Rename isShowCollectionChooserToolbar to showCollectionChooserToolbar for better readability. * Add documentation and refactor for product collection scope This commit introduces the following changes: 1. Update documentation to explain the `scope` argument for product collections 2. Refactor Collection Chooser and toolbar controls to handle default scope 3. Remove explicit `scope` from test collections to align with default behavior * Add E2E tests for Product Collection scope argument This commit adds E2E tests to verify the behavior of Product Collections registered with different scopes. It includes: - Tests for collections with 'inserter' and 'block' scopes - Verification of visibility in Collection Chooser - Checks for 'Choose collection' button visibility * Generate manifest file * Generate manifest file * docs: Remove unsupported emojis from product collection documentation --------- Co-authored-by: github-actions <github-actions@github.com> |
||
---|---|---|
.. | ||
bin | ||
content-templates | ||
plugins | ||
rules | ||
test-data/data | ||
tests | ||
themes | ||
utils | ||
.eslintrc.js | ||
README.md | ||
flaky-tests-reporter.ts | ||
global-setup.ts | ||
playwright.config.ts | ||
playwright.performance.config.ts | ||
tsconfig.json |
README.md
WooCommerce Blocks End-to-End Tests
This document provides an overview of the WooCommerce Blocks end-to-end testing process. For detailed instructions and comprehensive guidelines, please refer to the contributor guidelines document.
Quick Start
Preparing the Environment
-
Build the WooCommerce Plugin:
pnpm --filter='@woocommerce/plugin-woocommerce' watch:build
-
Go to the WooCommerce Blocks plugin folder:
cd plugins/woocommerce-blocks/
-
Start the environment:
pnpm env:start
Running the Tests
-
Run all tests:
pnpm test:e2e
-
Run a single test file:
pnpm test:e2e path/to/the/file.spec.ts
-
Run in UI mode:
pnpm test:e2e --ui
-
Run in debug mode:
pnpm test:e2e --debug