* Add tests for the Mini Cart Block when it is added on the FSE editor woocommerce/woocommerce-blocks#5727
Add tests for the Mini Cart Block when it is added on the FSE editor
* not hardcoding selectors
* fix typo
* restore old searchForBlock function
* add export
* Revert "restore old searchForBlock function"
This reverts commit 7049ad85bc2752ad33933eec00da9682943ec35a.
* use searchForBlock from package only for FSE pages
* add fix for GB
* Cleanup e2e jest config from moduleFileExtensions
moduleFileExtensions by default support js, ts, tsx etc.
* convert legacy-template-blocks e2e test to TS
* clean up jest.config.json moduleFileExtensions
unnecessary defaults override
* Prevent accessing the first element of the `parentProduct` array if empty
* Include all products regardless of their `stock_status`
By default, the `/wc/store/v1/products` endpoint does not return products with
`outofstock` stock status. We want the users to be able to select any product
regardless of its stock status, we need to explicitly request them using the
`stock_status` query param.
* Use the optional chaining operator
Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
* Shopper can have different shipping and billing addresses
* Shopper can have different shipping and billing addresses
* Shopper can have different shipping and billing addresses
* Correct billing field IDs
* Remove unused variable
* Remove unused timeout
* Remove unused commands
* Activate company field using setCheckbox
* Deactivate company field using unsetCheckbox
* Remove obsolete command
* Empty cart before and after each test
* Remove obsolete import
* Check billing and shipping company
* Remove manual code with unsetCheckbox
* Fill company if field exist
* Get checkbox ID from label
* Remove duplicate company field toFill method
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
* Empty commit for release pull request
* Updated changelog
* Prepare the Mini Cart block for Feature Plugin (https://github.com/woocommerce/woocommerce-blocks/pull/6127)
* Release notes
* Update plugin url
* Add 730 to README testing
* Remove PR from testing notes and changelog
* Remove PR from testing notes
* Allow memoized filters to re-run if `defaultArg` changes (https://github.com/woocommerce/woocommerce-blocks/pull/6102)
* Check the last defaultArg to decide whether we re-run filters
* Fake commit to make CI run
* Revert change to .gitignore to make CI run
* Update testing instructions
* Update testing instructions
* Update download link
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: tjcafferkey <tjcafferkey@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* upgrade wordpress/scripts to 22.3
* update jest config/setup
* add explicit-exports-references plugin
to handle payment-method-config.tsx spying on external methods
the way code is output now changed and tests like this would not
work anymore as transpilet files were no longer using exports but
local references to methods.
* missing snapshot
* make cart-products E2E test more stable
* surppress eslint error in test file
* fix css stylelint issues
* update eslint-plugin-woocommerce eslint package
* remove temp test:e2e:start script
* re-run
* add stylelint as recommended extension
* remove redundant types (provided by packages now)
* patch update @testing-library/jest-dom
* dry getAllTemplates util
* Improve goToSiteEditor e2e util
It will now properly wait for page to load
and critical parts to be available before
handing control over to the next steps
* adapt site editing tests to new goToSiteEditor API
* try to stabilize the saveTemplate
to early navigation was causing the dreaded
"Expected an Error, but "" was thrown"
* try stabilizing saveTemplate
* contextually group/sort params
* improve clarity of the goToSiteEditor E2E util
- adds goToSiteEditor private helper that hides the temporary need
for handling theme.php and site-editor.php paths
- adds two exported utils goToTemplatesList and goToTemplateEdit
that hide UX details of waiting ofr page to be ready on load including special
case for waitingFor templates list actions to be loaded
* put back page where it belongs ⚡️
* Create "isLoggedIn" shopper function
This function checks if a shopper is logged in
* Add "Can see warnings when form is incomplete" test
* Optimize login check and logout process for the test
Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
* Filter Products by Attribute: Fix dropdown search case sensitivity handling
* Refactor the dropdown search logic and add an isCaseSensitive option
* Dropdown search: Match against the name rather than value
* Clean up and refactor the search dropdown code
* Add handling of editor context via GUTENBERG_EDITOR_CONTEXT env var
* Fix flaky tests around editing templates
* Wait for save template response to complete
* Add XPath expressions
* Add "setCartQuantity" utility function
* Add "productIsInCart" utility function
* Add "update product qty" e2e test
* Clean up test file
* Fix test on headless mode
* Add Increase/Decrease qty test cases
* Decrease the query chain for better maintainability
* Rename expression functions/file for more clarity
* Resolve conflict with trunk
Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
* Update actions/setup-node to v2 and to use ,nvmrc file
* Fix order of actions for Bundle Size workflow
* Use actions/setup-node cache instead of actions/cache
+ ensure we always install with npm ci
* restore linting setup job to cache npm
* Don't install ndb in CI
Move ndb package to optionalDependencies and update
the CI workflows to not install optional dependencies
* Update actions/setup-node to v3
* Update actions/checkout to v3
* Update download and upload-artifact actions to v3
* Update actions/stale to v5
* Create the CurrencyCode and use it for the currency `code` instead of the type `string`
Using the CurrencyCode type, the allowed values for the `code` property are restricted
to the ISO 4217 codes and not any string.
* Add and remove some currency codes to match the ones on WooCommerce
The WooCommerce supported list can be found here: https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/includes/wc-core-functions.php#L475
* Use CurrencyCode type on CurrencyInfo and CurrencyResponse instead of string
The internal ID has been kept after a comment by @tjcafferkey. This causes a
bit of inconsistency in the internal code, but it was deemed that it would have
been better as users who have customized templates using this
blocks ID will have saved this in their database, and it would result
in a corrupt block when loaded, and we didn't want to support both IDs at the
moment.
Otherwise, most other references to the legacy template, are now using the word
“classic”.
Co-authored-by: Alba Rincón <alba@albasauatticmbp.home>