Commit Graph

19524 Commits

Author SHA1 Message Date
Niels Lange 7cd04dfa5a
Add e2e test to hover Mini Cart totals (#43693)
* Add e2e test to hover Mini Cart totals

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Optimise hover test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 20:06:28 +07:00
Thomas Roberts bf61e57ce4
Ensure "email" field id does not include the section ID (#43734)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 04:33:50 -08:00
Albert Juhé Lluveras 91d0e16151
Convert block templates tests to parametized tests (#43778)
* Convert block templates tests to parametized tests

* Use frontendUtils.addToCart() when possible

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 13:29:07 +01:00
Albert Juhé Lluveras 6c3f8cb6fb
Add e2e tests to verify block templates can be customized if the theme has its own custom templates (#43650)
* Update commands to run e2e tests

* Capitalize Product Catalog template name

* Create tests with block theme with templates

* Create Block Theme with Templates test environment

* Update classic theme commands

* Code cleanup

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Code cleanup (II)

* Add config to blocks-playwright.yml and remove unnecesssary .github/workflows/playwright.yml file

* Remove unnecessary imports from product-catalog-template.block_theme_with_templates.spec.ts

* Update blocks e2e commands to pnpm

* Replace hardcoded strings with a variable

* Unify all 'block theme with templates' tests in a parameterized test

* Create a testData object for the Mini-Cart template part test

* Fix some code styling issues

* Create a testData object for the Mini-Cart template part test (II)

* Remove duplicate userText variable

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 11:39:24 +01:00
Manish Menaria 8c284a5074
[Product Collection] Add unique ID attribute (#43314)
* Add unique ID attribute to Product Collection block

In this update, we introduced a unique identifier for each instance of the Product Collection block. This change involves several key modifications:

1. **Block JSON Update**: Added a new `id` attribute in `block.json` to store the unique identifier for each block instance.

2. **Product Collection Content Update**: In `product-collection-content.tsx`, we utilized the `uuid` library to generate a unique ID. This is done in a `useEffect` hook, ensuring that each block instance receives a distinct ID upon initialization.

3. **Type Definitions**: The `ProductCollectionAttributes` interface in `types.ts` was updated to include the new `id` attribute, aligning with our enhanced data structure.

4. **Package Dependencies**: To support this feature, `@types/uuid` and `uuid` were added to `package.json`, ensuring we have the necessary tools for ID generation.

This enhancement is pivotal for uniquely identifying each Product Collection block, paving the way for more robust and individualized block handling in the future.

* Rename uniqueId to id

* Add lock file

* Add 'id' context to product collection and template

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Merge trunk with 42861-introduce-a-unique-identifier-for-each-product-collection-block

* Regenerate the lockfile

* Remove autogenerated change in plugins/woocommerce/package.json

* Regenerate lock file

* Rerun CI actions

* Delete pnpm-lock.yaml file & regenerate it using pnpm install command

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 15:30:57 +05:30
Luigi Teschio 0a98e5acd6
[CYS - Core] Switch to TT4 when the flow starts (#43740)
* CYS - Core: add unit test

* Add changefile(s) from automation for the following project(s): woocommerce

* fix description

* Enable TT4 when the customize your store process starts

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-17 15:09:12 +01:00
Matt Sherman 824dc6be51
Remove BlockTemplateRegistry (#43589) 2024-01-17 07:12:12 -05:00
Vlad Bozdog 4966697b7f
41827-improve-coupon-usage-by-user-query-performance (#43731)
The sql query can be slow on big data sets, because the post meta value is type of string, and we are quering with a number.
2024-01-17 11:29:28 +01:00
Vedanshu Jain 90b3e11dba
HPOS: Remove buggy check in the data cleanup tool. (#43727)
* Add refund order to unit test.

* Remove buggy defensive check since existance of order is already verified.

* Changelog.

* PHPCS fixes.

* Added more assertions after cleanup to verify cleanup worked.
2024-01-17 14:58:11 +05:30
Chi-Hsuan Huang 8b567dcbc7
Update payment partners 2024 q1 (#43514)
* Remove eway and zipco

* Add Airwallex

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix lint

* Update airwallex images

* Fix category_other value

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-17 09:40:08 +08:00
Alexandre Lara 8258919e22
Product Gallery block: Remove the experimental flag from the Product Gallery block (#43586)
* Remove the experimental flag from the Product Gallery block

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 21:05:47 -03:00
Karol Manijak 1dd23f8eeb
Product Collection: add E2E tests to Editor filters - by featured products, by created date, by price range (#43473)
* Add test to Product Collection - featured products filters

* Open Featured option before trying to set it up

* Add test for Created filter

* Add missing awaits

* Add tests for a price range filter

* Add explanation to test step

* Update the conditions for created filter

* Add changelog

* Change leftover values

* Empty commit - trigger CI
2024-01-16 20:59:27 +01:00
Vedanshu Jain 4b401e59de
Add support for specifying filters when searching orders. (#43356)
* Add the UX element dropdown for search box.

* Add unit test for search_filter param.

* Add support for search filter in search query for better performance.

* Link search_filter dropdown with query param.

* Fix conflicts.

* Reformat to allow adding more filters in future.

* Fixing margin in the search filter box.

* Fix merge conflict.

* Apply linting.

* Add changelog.

* Apply PR suggestions.

* Grammer fixes.
2024-01-16 20:37:16 +05:30
Mike Jolley 1dee94362f
[Experimental] Surface additional checkout fields on Order Confirmation page (#43449)
* Get default attributes on front end

* Remove console log

* Show notice about 0 registered fields in editor

* Do not show block in editor if no fields are registered

* Wrapper block

* Styling/spacing

* Update webpack config

* Register heading pattern

* Wrapper block type definition

* get_fields_for_location return fields in array format

* Use wrapper in default content

* Separate fields from the hook block

* Hide when no custom fields exist

* Address and contact fields

* Shared form fields in settings

* remove info block from wrapper

* Revert render_content to original

* rename block

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Update styling

* Create shared get_order_additional_fields_with_values to format values

* Update block names and descriptions

* Show address placeholders

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Unused import

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 13:17:28 +00:00
Luigi Teschio dc0fd26917
CYS - Core: add unit test for the `NoAI` flow state machine (#43692)
* CYS - Core: add unit test

* Add changefile(s) from automation for the following project(s): woocommerce

* fix description

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 14:01:31 +01:00
Thomas Roberts c776fb63bc
[Experimental] Add custom validation hooks for additional checkout fields (#43435)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 03:01:51 -08:00
Alba Rincón b9f447b101
Update copy for CYS intro screen sidebar (#43551)
* Update copy for CYS intro screen sidebar

* Add changefile(s) from automation for the following project(s): woocommerce

* Avoid using variables in __()

* Add missing period

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2024-01-16 09:07:47 +01:00
Karol Manijak c531067daf
Improve the selector determining the products are loaded in Product Collection tests (#43464)
* Improve the selector determining the products are loaded in Product Collection tests

* Add changelog

* Update plugins/woocommerce/changelog/test-42038-make-product-collection-e2e-tests-more-robust

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

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-01-16 08:31:22 +01:00
Niels Lange 9779f0a022
Migrate mini cart tests (#43549)
* Migrate mini cart tests

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Adjust broken e2e test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 13:58:54 +07:00
Adrian Moldovan 04154eee09
[e2e tests] New test that checks a customer can comment on a post (#43419)
* Add new spec for checking comments on a post

* Add changelog

* Update locators to use geBy methods

* Update locators to use geBy methods

* Fixed strict mode violation
2024-01-15 15:24:22 -08:00
Thomas Roberts 23db3eff69
[Experimental] Handle adding attributes during fields registration (#43379)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-15 14:59:36 -08:00
Jonathan Lane f7e8b676d6
Change HPOS and non HPOS e2e tests to use 5 shards each (#43672)
* Change HPOS and non HPOS e2e tests to use 5 shards each

* Add changelog

* Update numbering

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-15 14:18:57 -08:00
Christopher Allford 95bc1189e5
Update `wireit` & Optimize Builds (#43595)
This bumps the version to 0.14.3 so that we can take advantage of some
upstream improvements. It also makes some changes to the way our
builds and watches work to minimize the number of unnecessary
Node processes involved in the execution.
2024-01-15 14:06:55 -08:00
Danny Dudzic 43be71a52f
[Experimental] Product Gallery: Update div elements to ul/li for better accessibility (#43612)
* Product Gallery: Update div elements to ul and li for better accessibility

* Product Gallery: Add changelog files

---------

Co-authored-by: roykho <roykho77@gmail.com>
2024-01-15 13:04:03 -08:00
Christopher Allford 31c170f80c
Added Missing Lint Build (#43665)
Unfortunately, it looks like we need to build in order
to be able to lint. This makes sense since some
projects will lint imports from others that haven't
been built yet.
2024-01-15 12:30:54 -08:00
Alejandro López Ariza cb269e47ab
Update stable tag to 8.5.1 (#43671)
woorelease: Update stable tag to 8.5.1
2024-01-15 20:38:09 +01:00
Adrian Moldovan 357e37819f
[e2e tests] Add new spec for remove product tests (#43518) 2024-01-15 20:23:30 +02:00
Tarun Vijwani d329ced1e8
E2E tests migration: performance -> cart (#42943)
* Add Performance Util class to evaluate performance

* Add performance logging in cart block test

* Remove additional comments

* Migrate Cart  E2E performance tests to Playwright

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Refactor performance calculations in PerformanceUtils page

* Fix linting errors

* Replace beforeAll with beforeEach

* Fix directory creation in performance-utils.page.ts

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-01-15 21:03:24 +04:00
github-actions[bot] 33ae0d607d
Delete changelog files based on PR 43641 (#43646)
Delete changelog files for 43641

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-15 16:06:42 +00:00
Maikel Perez d853af297b
Improve the validation process when changing the product type (#43564)
* Remove the required validation constraint from the LINK TO THE EXTERNAL PRODUCT field

* Add changelog file
2024-01-15 12:49:24 -03:00
Alba Rincón 50c7e51d86
Add "No AI" banner image and center banner content (#43547)
* Add "No AI" banner image and center banner content

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-15 14:17:33 +01:00
Karol Manijak 2c628a2938
Product Collection: add E2E tests to Editor filters - by tag and by stock status (#43548)
* Add test to check Product Collection filtering by tags

* Set single product out of stock and unskip the test for stock status

* Add changelog

* Use more specific selector

* Update variables holding products in products.sh to keep the same convention
2024-01-15 11:25:49 +01:00
Leif Singer 89cb0f7cef
clarify comment in maybe_sync_order (#43573)
* clarify comment in maybe_sync_order

* Add changefile(s) from automation for the following project(s): woocommerce

* appease the linter

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-15 10:24:29 +01:00
Vedanshu Jain e1f57da0ad
Use GMT date when fetching cancellation orders. (#43641) 2024-01-15 09:09:19 +01:00
Christopher Allford 758df4854d
Use `ci-jobs` Utility For `ci.yml` Matrix (#43532)
This adds support for using the `pnpm utils ci-jobs` command in our `ci.yml` file. One of the bigger benefits to this change too is that we're now distributing a bundled version of the utils tool. This lets us run it without actually having to install the repo and will let us speed up any workflows that currently do.
2024-01-12 20:32:14 -08:00
Maikel Perez 4f8922aa0b
Remove Variable product template from the product template list (#43422)
* Remove variable-product-template from the product template list

* Add changelog files

* Redirect the variable product to the new experience now that is does not have a product template anymore

* Fix php linter error
2024-01-12 18:47:15 -03:00
Alexandre Lara 4b5c6982e4
[Experimental] Product Gallery block: Prevent page from scrolling when pop-up is open (#43378)
* Prevent body from scrolling when pop-up is open

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add namespace to the modal-open css class

* Fix class name for the Product Gallery block

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-12 15:10:33 -03:00
Vlad Olaru 469b74433c
Fix Subscriptions autorenewals column for WooPayments pre-install promo in Settings > Payments (#43436)
* Do not sanitize WooCommerce Subscriptiion column HTML in Settings > Payments methods table

* Add features supports entry to pseudo-gateway WCPay Promotion

* Add changelog

* Add changelog entry for woocommerce-admin

* Lint fixes
2024-01-12 19:05:29 +02:00
Matt Sherman ee6642e0c7
Product Editor: Load layout templates from the REST API (#43384)
* Move ProductTemplate type

* useProductTemplate

* Use useProductTemplate

* Use useLayoutTemplate

* Handle if window.productBlockEditorSettings doesn't exist

* Unit tests for useProductTemplate

* Fix fallback in useProductTemplate

* Remove layoutTemplates from ProductEditorSettings on client

* Fallback to simple-product layout template

* Unit test to verify the standard product template is used if product type is variable

* Use standard product template if product type is variable

* Unit test to verify product type is used to match if product template id matches a template with a different product type

* Make sure product type matches on product template, unless variable, in which case we match simple

* Remove layoutTemplates and layoutTemplateEvents from global

* Changelog

* Changelog

* Import types only
2024-01-12 11:54:35 -05:00
github-actions[bot] ad735b2bf2
Delete changelog files based on PR 43550 (#43568)
Delete changelog files for 43550

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-12 17:00:10 +01:00
github-actions[bot] 69360cd93e
Delete changelog files based on PR 43497 (#43563)
Delete changelog files for 43497

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-12 16:52:50 +01:00
github-actions[bot] f6f7c076f4
Delete changelog files based on PR 43504 (#43523)
Delete changelog files for 43504

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-12 16:52:02 +01:00
github-actions[bot] 6dba702341
Delete changelog files based on PR 43506 (#43539)
Delete changelog files for 43506

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-12 16:51:44 +01:00
Jonathan Lane ac5ffdae46
Move e2e HPOS disabled tests to matrix (#43537)
* Move e2e HPOS disabled tests to matrix

* Changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-12 10:30:10 -04:00
Alba Rincón be1c794387
Remove the `patterns_ai_data` post from DB when resetting the CYS (#43499)
* Call the `/wc/private/ai/patterns` to remove the `patterns_ai_data` post from the db

* Add changefile(s) from automation for the following project(s): woocommerce-beta-tester

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-12 13:58:32 +01:00
Luigi Teschio 5edea79b41
CYS: fix php warning raise by the Product Collection block (#43546)
* CYS: fix php warning raise by the Product Collection block

* fix typo

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-12 13:44:06 +01:00
Albert Juhé Lluveras aa661f2234
Fix Mini-Cart price disappearing on hover (#43550)
* Fix Mini-Cart price disappearing on hover

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-12 13:39:34 +01:00
Roy Ho 5d87130b43
[Experimental] Product gallery/remove default (#43487)
* Remove Product Gallery block as default

* Add beta label to Product Gallery block title

* Add changelog files
2024-01-11 18:03:58 -08:00
Niels Lange 780196a5b0
Fix notice template overwrites (#43506)
* Fix notice template overwrites

* Add changefile(s) from automation for the following project(s): woocommerce

* Bump template versions

* Changing template version numbers to 8.5.0 as they haven’t been touched

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-11 22:12:55 +01:00
Jorge A. Torres 9ce508f47d
Add HPOS CLI tool to compare an order between datastores (#43173)
* Add `wp wc hpos status` command

* Add helper method to build order from different datastores

* Add helper method `get_diff_for_order()` to compare orders between datastores

* Add CLI tool `wp wc hpos diff` to compare an order between datastores

* Add changelog

* PHPCS fixes

* Better format for dates
2024-01-11 16:51:01 +00:00