woocommerce/plugins/woocommerce-blocks/tests/e2e
Karol Manijak dace7ba296
Product Collection: add control to toggle whether block is filterable in non archive context (#49627)
* Add syncWithFilters attribute to Product Collection

* Add SycnWithFilters Inspector Control to PC

* Minor import adjustments

* Move the controls to Inherit as they share the same labels

* Rename the attirbute to filterable

* Hide control for collections

* Consume the filterable

* Consume filterable attribute so it enables the filtering

* Bring back file format

* Bring back filterable

* Move filterable from attribute to query

* Improve checks

* Fix incorrent function name

* Add changelog

* Set the default filterable value on insert

* Update test selector

* Add E2E tests to #49627 (#49715)

* Remove unnecessary call to create new post

* Fix "Use page context" control tests

* Fix post ↔ template collection sync test

* Fix non-thenable linter errors

* Extend the "Use page context" default setting test

* Add test for filtering in non-archive context

* Add test for combining editor and front-end filters

* Fix lint

* Update plugins/woocommerce-blocks/assets/js/blocks/product-collection/edit/inspector-controls/inherit-query-control.tsx

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>

* Improve query properties access

* Rename inherit-query-control to use-page-context-control to better depict its purpose

* Lint fix

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-07-24 11:51:53 +02:00
..
bin Blocks E2E: Fix DB snapshot removal step in setup script (#49677) 2024-07-19 12:02:56 +02:00
content-templates Blocks E2E: Streamline E2E utils implementation (#47660) 2024-05-27 14:54:06 +00:00
plugins Product Collection: allow custom collections hiding each of the filters (#49713) 2024-07-23 09:03:27 +02:00
rules Blocks E2E: Streamline E2E utils implementation (#47660) 2024-05-27 14:54:06 +00:00
test-data/data Refactor review blocks e2e tests to remove redundant html templates and add more scenarios (#44880) 2024-02-29 15:43:59 +13:00
tests Product Collection: add control to toggle whether block is filterable in non archive context (#49627) 2024-07-24 11:51:53 +02:00
themes Initialize BlockTemplatesController for block themes only (#48905) 2024-07-03 11:31:41 +02:00
utils Update WC blocks wp-env to use WP 6.6 RC1 (#49037) 2024-07-03 16:09:43 +01:00
.eslintrc.js Blocks E2E: Restore the no-hooks rule (#47500) 2024-05-15 13:05:52 +02:00
README.md Settings Save button disable/enable (#47444) 2024-06-25 13:12:14 +12:00
flaky-tests-reporter.ts [blocks e2e] Move Blocks e2e into ci.yml (#48224) 2024-06-11 19:57:23 +03:00
global-setup.ts Blocks E2E: Streamline the usage of WP CLI (#47869) 2024-05-28 17:09:28 +02:00
playwright.config.ts [blocks e2e] Update config for retries and trace retention (#49416) 2024-07-11 11:14:14 -07:00
playwright.performance.config.ts Blocks: Isolate performance tests from e2e tests (#46773) 2024-04-23 13:11:46 +02:00
tsconfig.json Blocks E2E: Align ESLint and TS configs with Gutenberg (#47228) 2024-05-14 10:23:17 +02:00

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

  1. Build the WooCommerce Plugin:

    pnpm --filter='@woocommerce/plugin-woocommerce' watch:build
    
  2. Go to the WooCommerce Blocks plugin folder:

    cd plugins/woocommerce-blocks/
    
  3. Start the environment:

    pnpm env:start
    

Running the Tests

  1. Run all tests:

    pnpm test:e2e
    
  2. Run a single test file:

    pnpm test:e2e path/to/the/file.spec.ts
    
  3. Run in UI mode:

    pnpm test:e2e --ui
    
  4. Run in debug mode:

pnpm test:e2e --debug