Co-authored-by: Luigi <gigitux@gmail.com>
- Updates the `@wordpress/e2e-test-utils-playwright` package to use the npm release.
- Removes hard-coded WP version in `.wp-env.json` to use the latest Core release.
- Fixes failing Playwright tests when using WP 6.3.
- Pins the core version (6.2.2) for Jest E2E tests so they can keep passing. We decided not to fix those tests because we're moving to Playwright.
* Update Interactivity API JS files
* Disable TS checks in the Interactivity API for now
* Add new SSR files
* Replace wp_ prefixes with wc_ ones
* Replace wp- prefix with wc-
* Replace guternberg_ prefix with woocommerce_
* Remove file comments from Gutenberg
* Rename files with `wp` prefix
* Fix code to load Interactivity API php files
* Remove TODO comments
* Replace @wordpress with @woocommerce
* Update Webpack configuration
* Fix directive prefix
* Remove interactivity folder from tsconfig exclude
* Add client-side navigation meta tag code
* Remove unneeded blocks.php file
* Fix store tag id
* Register Interactivity API runtime script
* Fix Interactivity API runtime registering
* Remove all files related to directive processing in PHP
* Move json_encode to Store's render method
* WIP
* WIP
* WIP
* WIP
* Preserve previous context
* Ignore Minicart block on client-side navigation
* Refresh page on store updatRefresh page on store updatee
* Refactor logic
* Add console error when a path is missing
* fix PHP lint error
* WIP store
* use store approach
* update jest configuration
* restore Mini Cart changes
* move cart store subscription to interactivity package
* move interactivity flag
* format HTML
* move addToCartText to the context
* Load product-query stylesheet when rendering the Products block
* update sideEffects array
* fix catch
* rename moreThanOneItem to isThereMoreThanOneItem
* improve how scripts are enqueued
* update default value for the filter woocommerce_blocks_enable_interactivity_api
* Update assets/js/atomic/blocks/product-elements/button/block.json
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update assets/js/interactivity/cart/cart-store.ts
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* fix block.json
* remove updateStore function
* restore interactivity api changes
* import cart store
* show notice when there is an error
* add logic to dequeue script on classic themes and block themes
* imrpove logic about notice
* Interactivity API: add `afterLoad` callbacks to `store()` function (https://github.com/woocommerce/woocommerce-blocks/pull/10338)
* show notice when there is an error
* Add initial implementation for store callbacks
* Run `afterLoad` callbacks after `init`
* Move cart state subscription to Product button
* Remove cart-store from Interactivity API internals
* Change callbacks with options and save only afterLoad callbacks
* ProductButton: Add animation (https://github.com/woocommerce/woocommerce-blocks/pull/10351)
* implement animation
* improve logic
* refactor logic
* refactor code
* address feedback about code style
* add support for woocommerce_add_to_cart_quantity
* Fix animation flickering
* Introduce wp-effect, reduce the amount of numberOfItem variables to 2 and consolidate animation status
* add support for added class
* Remove unnecessary selector
* Don't fetch cart if it was already fetched
* remove added class
---------
Co-authored-by: Luis Herranz <luisherranz@gmail.com>
---------
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Luis Herranz <luisherranz@gmail.com>
* update deepsignal
* remove added class
* update deepsignal
* Interactivity API and Product Button: Add E2E tests (https://github.com/woocommerce/woocommerce-blocks/pull/10036)
* Add FrontendUtils class
* fix conflicts
* use locator
* restore click usage
* Product Button: Add E2E test
* fix util
* fix E2E tests
* remove comment
* Add E2E test to ensure that woocommerce_product_add_to_cart_text works
* update sideEffects array
* add zip and unzip as package
* fix wp-env configuration
* fix E2E test
* add report
* try now
* try now
* try now
* fix E2E test
* E2E: Add documentation for testing actions and filters. Fixeswoocommerce/woocommerce-blocks#10135 (https://github.com/woocommerce/woocommerce-blocks/pull/10206)
* update description
* fix label
* rename files
* make requestUtils private
* remove page.goto
* use toHaveCount
* use productsToDisplay variable
* fix E2E tests
* rename class utils
---------
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
---------
Co-authored-by: David Arenas <david.arenas@automattic.com>
Co-authored-by: Luis Herranz <luisherranz@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
* Move e2e to e2e-jest
* Move e2e-pw to e2e
* Update e2e usage + scripts
* Missed some directory renames
* Update gitignore
* Remove test results as its in gitignore
* Add eslint playwright plugin configuration
* replace networkidle with commit
* address Unnecessary await expression. This method does not return a Promise error
* address 'Unexpected usage of not.toBeVisible(). Use toBeHidden() instead' error
* address 'Unexpected use of the .skip() annotation.' error
* address 'toHaveCount' must be awaited or returned' error
* address ''page' is defined but never used '
* address ''toBeVisible' must be awaited or returned'
* address 'Unexpected use of element handles'
* address 'Unnecessary await expression. This method does not return a Promise'
* address 'Test has no assertions'
* address 'Unexpected use of page.waitForTimeout()'
* address 'Avoid having conditionals in tests'
* WIP Product Gallery: Add the Thumbnails block
* Product Gallery Thumbnails: Add block settings
* Add template for the Product Gallery block
* Add template for the Product Gallery block. Add the rest of the files.
* Product Gallery Thumbnails: Add context settings sharing between the Product Gallery and Thumbnails block.
* Product Gallery Thumbnails: Add UI functionality and frontend functionality. Add settings for the Thumbnails in both places - Product Gallery and the Thumbnails block.
* Product Gallery Thumbnails: Move the static template ouside of the component
* Make sure the context is set before accesing the array values
* Product Gallery Thumbnails: Move the setGroupAttributes() function outside of the component
* Product Gallery Thumbnails: Fix TS errors
* Product Gallery Thumbnails: Update the Features Flags and Experimental Interfaces doc
* Product Gallery Thumbnails: Fix TS error
* Product Gallery Thumbnails: Remove unused stylesheet
* Product Gallery Thumbnails: Fix TS errors
* Product Gallery Thumbnails: Remove unused context and fix the thumbnails bottom position styling on the frontend.
* Product Gallery Thumbnails: Allow the user to move the horizontal thumbnails above the large image and don't overwrite that automatically
* E2E: Add tests for the Product Gallery Thumbnails block
* Product Gallery Thumbnails: Add code comments and remove the incorrect conditional check when moving thumbnails up and down
* Product Gallery Thumbnails: Add failure handling
* Product Gallery Thumbnails: Fix the eslint dependency error
* Product Gallery Thumbnails: Add inner blocks to the sideEffects array
* Product Gallery Thumbnails: Refactor Product Gallery edit code and move the logic to a utils file
* Product Gallery Thumbnails: Update the utils file
* Product Gallery Thumbnails: Update the utils file. Fix comment indentation
* Product Gallery Thumbnails: Fix failing tests
* Revert unrelated package.json changes
* Product Gallery Thumbnails: Further package.json reverts
* Product Gallery Thumbnails: Rename the test screenshots
* Product Gallery Thumbnails: Fix undefined variable html when only 1 product image is set
* Product Gallery: Rename clientId to productGalleryClientId
* Product Gallery Thumbnails: Combine the useEffect code having the same dependencies
* Product Gallery Thumbnails: Combine all useEffect code together
* Product Gallery Thumbnails: Add a ThumbnailsPosition enum
* Product Gallery Thumbnails: Update the thumbnailsPosition to an enum
* Product Gallery Thumbnails: Fix TS errors
* Product Gallery Thumbnails: Fix TS errors
* Product Gallery Thumbnails: Add missing dependency
* Product Gallery Thumbnails: Uppercase the enum and fix the thumbnails position bug when initially adding the Product Gallery block
* Product Gallery Thumbnails: Fix E2E tests
* Product Gallery Thumbnails: Remove unused function from frontend utils
* Product Gallery Thumbnails: Remove unused screenshots and config amendment
* Product Gallery Thumbnails: Add check for the order of block on the frontend
* Product Gallery: Add crop, zoom and full-screen settings
* Product Gallery Thumbnails: Replace ts-ignore with ts-expect-error
* Product Gallery Thumbnails: Replace ts-ignore with ts-expect-error
* Product Gallery Thumbnails: Revert back to ts-ignore
* Revert "Product Gallery: Add crop, zoom and full-screen settings"
This reverts commit 840654197619e2611029b81990493387ae0b543d.
* Product Gallery: Add crop, zoom and full-screen settings
* Product Gallery: Remove the redundant React Fragment
* Product Gallery E2E: Simplify and combine the tests
* Make sure the revert button is registered and enqueued for usage exclusively in the site editor.
* Register and enqueue the styles for the revert button.
* Rename the files.
* Revert "Rename the file renames."
This reverts commit c0330ce70fec20bea1f957eddcf458881e16242c.
* Add plugin-proposal-optional-chaining to the WebPack plugins config.
* Rename the files.
* Remove unnecessary dependencies as those are already provided via : more specifically, get_script_data.
* Address CR.
* Convert summary/utils to TS
* Add @wordpress/wordcount type defs
* Move trimWords, trimCharacters, remoteTags & appendMoreText to own file
* Add tests for trimWords and related functions
* Trim payment method description if it is longer than 30 words
* Make Mini-Cart block work well with caching plugins
* Add tests
* Add back aria-label to Mini-Cart menu
* Fetch Mini-Cart data before page finishes loading
* Store and retrieve Mini-Cart values from localStorage for better performance
* Update styles as early as possible
* Reorder code
* Remove overrideTotals param from updateTotals() function
* Update tests
* Initialize local storage inside a function and add act to filter tests
* Replace void with undefined types in several funtions
* Fix 0 quantity badge appearing on page load
* Replace all style hooks with useStyleProps hook
* Remove border/color/spacing hooks
* Style Props Hook
* Make use of `change-case` package
* Tidy up block wrappers
* Attribute filter does not use frontend.ts nor styles within block
* Remove frontend from filter blocks and unused styleprops usage
* Tidy up variable names so its clearer attributes are not required specifically from blocks
* Update assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-title-label-block/block.tsx
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update assets/js/blocks/attribute-filter/block-wrapper.tsx
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update assets/js/blocks/active-filters/block-wrapper.tsx
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-checkout-button-block/block.tsx
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
* Update assets/js/blocks/rating-filter/block-wrapper.tsx
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
* Update assets/js/blocks/stock-filter/block-wrapper.tsx
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
* Update assets/js/blocks/price-filter/block-wrapper.tsx
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
* Update assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-cart-button-block/block.tsx
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
* Simplify styleprop
* Styleprops simplify
* Fix withFeaturedItem styles
* Like the original hook, flatten props and combine with parsed styles
---------
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>