* Migrate Puppeteer test action from Blocks repo
* Update file path
* Use pnpm
* Use npm
* Updates based on feedback
* Comment out paths for testing
* Fix paths with working directory
* Use pnpm
* Fix missing pnpms
* npm instead
* Do use pnpm
* Update command
* Blocks wp-env config
* Update paths, config files
* Run test commands from blocks
* Config update
* Uncomment paths so that e2e checks only run on Blocks
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Fixed Blocks' `wp-env` Configuration
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update action for API tests
* Changelog
* Update e2e tests
* Rename WooCommerce Payments to WooPayments
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Similarly to `build:project`, a new `watch:build:project`
script will watch individual projects for changes. The
`watch:build` script has been updated so that it does
a deep watch in the same vein as `build`. We have also
hooked up tool-level watching for faster performance.
When using a preset we need to keep in mind that the transformation
paths are relative to the preset, not the consuming package. We get
around this by using `<rootDir>` in the transform paths. However,
doing this means fixing the root directory for all of the jest tests.
This keeps the tests working in the same way but lets us fix the
preset too.
* Clean up created pages and posts
* Move tax tests so that they run last
* Improve locators
* Changelog
* Improve locators
* Improve locator on heading
* Change assertions to look for alert text
* Change assertion to look for text
* Update locators
* Update locator
* Update alternate elements
* Specify first order amount
* Update locator
* Changelog
* Increase reliability of checkout test
* Update a few locators
* Remove .slice()
* Add some console output to checkout test
* Make command palette tests Mac-compatible
* Added update for why download test flaky
* Improvements to checkout tax tests
* Add changelog
* Assert on range of prices
* Improve the regex for matching the price
* Changelog
* Clean up locator
* Unskip analytics tests
* Remove logging statements
* Update variations selector
* Remove comment
* Fix disable block tests
* Remove skipped legacy coupon page test
* Account for multiple products in test
* Cleaned up some console.logs
* Added specificity to locator
* Better price parsing
* Fix cart block shipping test
* Fix syntax error
* Update Playwright, fix logic error
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Having an explicit `"files"` definition will allow us to fingerprint
dependencies in `wireit` more granularly. This avoids problems
that can be caused by different source files and directories that
trigger a rebuild in a dependee before a dependent finishes.
Fixes some issues where pagination and filters were not persisting in the DB log list table view after running a bulk action. Also adds a way to customize the number of log entries shown per page.
Fixes#39359
Wireit doesn't allow us to have build outputs in a directory outside
of the package. We can get around this by having a build step in
WooCommerce that copies the files from the output directories.
We're adding this to _every_ package since they have their own
configuration and scripts to run. This also keeps them
isolated so that they can operate independently.
NPM requires names to be single-word or have a scope. The
current name is not valid. The package has been renamed
`@woocommerce/shortcode-assets` to better match its purpose.
NPM package names _must_ either be single-word or have
a scope. The current structure is unsupported and has been
changed. The new package name is `@woocommerce/admin-library`.
* convert first local pickup test
* Convert the second local pickup test
This test detected a bug. We will skip it for now and create a ticket to fix it!
* Remove old local pickup E2E tests
* Convert Payment Methods E2E tests
* Remove old payment methods tests
* Convert shipping/billing E2E tests
* Remove old shipping/billing E2E tests
* Add some line breaks for a better readability
* Update tests/e2e/tests/checkout/checkout-block.shopper.block_theme.side_effects.spec.ts
Co-authored-by: Niels Lange <info@nielslange.de>
* Fix ESLint errors
* Move E2E tests to the Checkout shopper file
* Fix ESLint error
* Convert Checkout Error Forms E2E tests
* Use guest user instead of logged in customer for Checkout Errors E2E tests
---------
Co-authored-by: Niels Lange <info@nielslange.de>
Once a feature plugin has been merged it is no longer necessary for it
to be activated. In some cases, having it activated can actually
lead to problems. This will automatically disable any packages
that we have marked as "merged".
* Convert checkout place order E2E tests to Playwright
* Add "gotoMyAccount" method
* Create login/logout utility functions
* Use the existing "customer" test data
* Complete the place order test cases
* Fix "My Account" page title
* Fix rebase
* Reset My account page title
* Check for heading instead of the page title
* Check for heading in login/logout functions
* Fix all failing tests
* Add guest/customer/admin roles
* Update the auth setup
* Register the auth setup within Playwright
* Update testing cases
* Add generated auth files to .gitignore
* Tidy up comments
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Remove unnecessary comment
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update comments
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Remove unnecessary comment
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update comment for Guest case
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Remove confusing comment
* Remove another unnecessary comment
* Remove unnecessary Playwright project dependency
* Tidy up the file structure and constants
* Fix mixed up test descriptions
* Remove commented code
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Remove unnecessary function from frontend-utils
* Refactor testing cases
* Rename testing file
* Delete unused testing file
* Ensure we're logged out before trying to log in as a user
* Log out before each authentication setup step
* Ensure tests requiring admin are logged in
* Log in as admin during block theme setup
* Fix Playwright strict mode violation
* Run Multiple sign-in roles to the global-setup phase
In this step of the Playwright's setup, we can add the multiple sign-in
roles and keeping the admin logged by default.
This fixes the issue of failing tests `logged out` error.
* Remove unnecessary login as admin
* Remove "auth.setup" dependency since the logic lives in the global setup instead
* Remove unnecessary login as admin from test files
The admin profile is set by default
---------
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Add missing selectors to docs
- Add missing selectors for the following:
- data-store/checkout
- data-store/collections
- data-store/payment
- data-store/schema
* Fix markdown
* Fix getIncompatiblePaymentMethods selector description.
* Fix schema selectors information
* Fix additional spacing
* Add more information about the objects.
* Update checkout.md to use more descriptive
variable name for prefersCollection
* Products in this group field should not be visible in any other product types, only visible in the grouped product type.
* Stock status under Inventory tab should not be visible when editing/creating a grouped product.
* Variations tab is not visible when editing/creating a grouped product.
* Add changelog file
* Fix php linter
* Update Features Flags and Experimental Interfaces doc with Collection Filters and its inner blocks
* Replace feature flag references with links to specific commit, not trunk
* Create section description block
* Add changelog files
* Change section description block to receive its content from the attributes instead of innerBlocks
* Change border color to Gutenberg 100 for Cart and Checkout blocks
* Change form input color to Gutenberg 900 for Cart and Checkout blocks
* Fix additional border colors of Checkout block
* Update borders and form field colors in Cart Block
* Change border color to $universal-border-light
* Change border color for cart line items to $universal-border-light
* Change form input fields border color to $universal-border-dark
- Add $universal-border-dark color variable for woocommerce/woocommerce-blocks#1e1e1e on white.
* Fix colors of text area border and form steps
* Change form input fields border color to $universal-border-dark
- Add $universal-border-dark color variable for woocommerce/woocommerce-blocks#1e1e1e on white.
* Fix form steps
* Update universal dark border rgba value
- Update universal dark border rgba value from rgba(0, 0, 0, 0.882) to rgba(17, 17, 17, .80) to keep it consistent with universal-border colors
* Update $universal-border-light color
* Update the opacity of the borders
* Update the border color to rgba (17, 17, 17, 0.12)
* Roll back $universal-border-light value to the original value: 0.115
* Remove Opacity and pass it as argument in with-translucent-border
- We have with-translucent-border option that accepts border and opacity for pseudo elements.
* Remove additional spaces
* Replace with-translucent-border with normal border
- Since we're are not mixing the opacity to the border color so we don't need to use mixin with-translucent-border.
* Fix applied css and add low contrast Color usage details
- Fix minor CSS as per the standards.
- Add comments for universal border colors that they're low contrast colors and should be used for decorative elements only
* Fix border gap and double border for multiple shipping packages
* Fix payment method borders and Cart line items borders
- Change border bottom to border-top for cart line items.
- Fix payment method radio control borders.
* Fix local pickup border
- Local pickup was using with-translucent-borders so it has some opacity, changed it to border-bottom.
* Add border-bottom to cart items
* Remove additional border from Cart items
* Fix radio and checkbox borders as per the design
* Fix shipping method borders and background color as per the design.
* Force align left on the description for the local pickup options.
* Update border color in quantity selector component
* Fix Shipping options radio selection alignment
- Add left padding to wc-block-components-shipping-rates-control__package element.
* Update colors and variables
* Change checkbox and radio button colors
- Change checkbox and radio button colors from rgba(25, 23, 17, 0.3) to rgba(25, 23, 17, 0.48).
* Remove bottom property from express payment style
* Fix casting on Utils::wp_version_compare
* Fix linting issue
* Apply version number fix on current wp version
* Fix linter errors
* Fix linter errors
* fix: useEditorBlocks hook always returns an array
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* CYS: Reset products when the AI is offline
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* CYS: Add DELETE private/ai/products endpoint
* Ensure the hash for the product is also updated on content reset.
---------
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
* fix: CSY - update font copy when ai is offline
* Add changefile(s) from automation for the following project(s): woocommerce
* update font
---------
Co-authored-by: github-actions <github-actions@github.com>
* Remove ADD_LABEL step for 'status: ready to merge'
This updates the workflow to remove the step for adding the 'status: ready to
merge' label.
Additionally, this adjusts the naming within the job to reflect the
change to the workflow.
* Remove entire workflow for Approved Pull Requests
Once Woo Blocks is merged into the monorepo, this workflow will no
longer be needed / relevant at all.
* CSS3 transitions for all fade animations
* Changelog
* Whitespace
* Formatting
* Lambda function
* Comment
* Clean up transitionEnd event listeners if (!touch)
* Update this.offsetWidth comment
* Use jQuery methods in order to greatly reduce diff
* Add missing class
* Add changefile(s) from automation for the following project(s): woocommerce
* Template bump
* Bump version
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add missing actions to the documentation
- Add the missing actions to the following:
- data-store/cart
- data-store/checkout
- data-store/collections
- data-store/validation
* Move actions above selectors in Cart doc
* Add more info to cart actions
* Fix syntax of Cart actions examples
* Fix syntax and examples
- Use store name constant instead of strings
- Fix description and examples of collections document
* Add more info about the keys of objects and arrays
* Update billing address info in cart data
* Update parameter names and descriptions in
checkout.md and collections.md
* Update docs/third-party-developers/extensibility/data-store/checkout.md
Co-authored-by: Niels Lange <info@nielslange.de>
---------
Co-authored-by: Niels Lange <info@nielslange.de>
* Center align view all link
* Add thumbnail count specific styling
* Product Gallery Thumbnails: Improve the responsiveness of the View All overlay text
---------
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
* Add tests for the `useCampaigns` hook in the woocommerce-admin marketing.
* Add `channels` to the deps of `useSelect` in the `useCampaigns` hook to avoid outdated hook states.
* Make the `useCampaigns` hook support being used with multiple instances.
- Include the `perPage` in the page key of campaigns in the multichannel's data store.
- Move the processing of querying the campaigns paging to the selector of the multichannel's data store.
- Move `total` in each campaign's paging of the multichannel's data store.
- Remove unused properties and their types: `state.campaigns.perPage` and `state.campaigns.total`
* Add changelog
* Multichannel data store - Move the `total` from `campaigns.pages[*]` to `campaigns.meta` to have only one total value.
Related to:
- https://github.com/woocommerce/woocommerce/pull/41211#discussion_r1409634640
- https://github.com/woocommerce/woocommerce/pull/41211#discussion_r1409590559
* Multichannel data store - Return the pagination meta of campaigns along with the `getCampaigns` selector.
Address: https://github.com/woocommerce/woocommerce/pull/41211#discussion_r1412266127
Improves the doc block of `wc_get_logger()` to reflect that the return
value will be a class that implements `WC_Logger_Interface`, but may
not actually be an instance of `WC_Logger`.
Fixes#41256
* Change the default for Mini Cart block
The Block Hooks API currently doesn’t allow for setting the default state of the block injected into content so this ensures the mini-cart block has a better default state for injection. The current default (displaying total value in cart) takes up more width increasing the risk of poor layout.
* Utilize Block Hooks to automatically inject mini-cart block.
* include experimental prefix on filters
* Fix filter name.
* remove experimental prefix.
On thinking about this, I don’t think these need to be experimental. They are intentionally provided as escape hatches for hosts/themes that want to opt-in/out so we’ll have to support them when this is shipped (at least until its no longer needed!)
* fix variable name!
* fix unit tests because of new default
* remove another incorrect text expectation
Defaults for the block affect this expectation.
* fix E2E tests
* Mini Cart Block: improve E2E test
* fix: improve check for the Product Collection block
---------
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* Switch assemble theme to TT4
* Add changefile(s) from automation for the following project(s): woocommerce
* Rename changelog file
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove duplicated changelog
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove duplicated changelog
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fix restriction preventing the update of products with AI-generated content after the 3rd attempt.
* use set_slug rather than wp_update_post for updating the product permalink.
---------
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Ensures that if the "Search within these files" form is submitted with
an empty input, it does not trigger a fatal error due to the search
method returning an empty array at a time when it should be returning
the integer `0`.
This PR removes a line-height rule causing vertical alignment issues in the variations selector and introduces a bottom margin on the single variation container.
Closes#41367
* Show variations in upsells when parent is not published
I was struggling to get the upsell section to show for our eCommerce site. After some digging I found that line 1525 stopped variations from showing in the upsell section if the parent product was set to privately published. This makes testing products and upsells hard, and it's inconsistent behaviour when simple products that are privately published do show up. The proposed change will make variations show up as long as the current user can edit the parent product. This is consistent with the behaviour for simple products.
* Add changelog
---------
Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
* Flush after updating all products, not after updating each of the products
Flushing is an expensive operation so we should run it carefully
* Remove the index param and add the last_product param to the Product endpoint.
---------
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
* Create closeWelcomeModal, goToPageEditor and goToPostEditor utils in PlayWright e2e tests
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Create add to custom fields documentation
* Update the checkout custom field docs
* Add back end steps and examples
* Make it clear that we are building a field block
* Update docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-custom-fields.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-custom-fields.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-custom-fields.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-custom-fields.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Mention that the block will not render if parent isn't required
* Add more details about `seExtensionData`
* Add additional code examples for the backend
* Avoid extending store API inside an IntegrationInterface
* Add code example that invokes the extend store endpoint class
---------
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Avoid running a second query to account for incorrect totals if pagination is set too high if pagination isn't used.
Fixes#40075
* Adding changelog entry
* Add extra protections against wrong filter values in the Command Palette logic
* Add changefile(s) from automation for the following project(s): woocommerce
* Add protection to make sure is an array
---------
Co-authored-by: github-actions <github-actions@github.com>
* Show warning modal when user tries to leave the assember hub
* Remove pushState and popstate changes from the iframe
* Listen to popstate and render a warning modal when the user tries to leave the page
* Add changefile(s) from automation for the following project(s): woocommerce
* Update GoBackWarningModal to accept a callback for reusability
* Reuse GoBackWarningModal
---------
Co-authored-by: github-actions <github-actions@github.com>
* sets sale price to 23:59:59 when sale schedule variation bulk action runs
* made the date being sent in the CRUD object coherent with the rest of the wc codebase. added changelog file
* fix issue raised by linter
* Limit number of visible incompatible extensions in sidebar notice
* Adjust link text
* Ensure text-decoration works in Safari
* Minor CSS tweaks
* Refactor constant names
* Adjust chevron position for opened state
* Revert "Adjust chevron position for opened state"
This reverts commit ff5142427738626837be887dd8d7e5d94c2432d4.
* Normalize render method names
* Refactor get_query_params to allow key filtering
* Scaffold the search results view
* Add missing unslash
* First pass at functional search
* Fix memory leak and recursive highlighting
* Fix various search string edge cases
* Move match highlighting to format_match method
* Tweak match line formatting
* Rename ListTable to FileListTable
* Switch search results view to a list table
* Add notice about max files for search
* Remove unused function
* Only use monospace font on the matched line part of search results
* Add notice about search result limit
* Fix font in table header
* phpcs cleanup
* Remove unnecessary search form action
* Add caching to search results
* Add unit test for search method
* Caching improvements
* phpcs cleanup
* Add unit test for close_stream
* Remove unneeded linting exception
* Add changelog file
* Remove unnecessary usage of get_class()
* Make sure file stream gets closed when we break the loop early
* Make the returned results an even 200 when hitting the limit
* When the user selects a grouped product type, we show an additional Products in this group section in the General tab.
* When the user selects a grouped product type, we hide the Pricing and Shipping tabs.
* When empty, the grouped products card has an empty state with an illustration
* When the user clicks Add products, we show a modal
* When the user clicks the search field, we immediately display the list of all existing products. It is sorted alphabetically. Clicking an item closes the search and adds the product to the list.
* Add remove button to the product list
* When the user clicks Add, we close the modal and display the list of added products in the product form
* Clicking the product name will open it in the editing view in a new tab
* Clicking the arrow button will open the product's page in a new tab
* Prevent adding already added products
* If the name or SKU extends beyond this width, we truncate the text
* Add changelog files
* Fix linter errors
* add simple initial integration with Command Palette
* Add WooCommerce commands
* Add e2e tests
* Fixes
* Add changefile(s) from automation for the following project(s): woocommerce
* Avoid using page.waitForLoadState() in Command Palette tests
* Make Settings and Analytics commands dynamic
* Decode entities to make sure characters are displayed correctly in the command palette
* Move decodeEntities() into registerCommandWithTracking()
---------
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: github-actions <github-actions@github.com>
* Tweak the product prompt
To avoid creating products that are things that cannot be sold in stores (forests, people, etc.)
* Return error when images are not provided
* Check permalink and flush cache if not found
* Update the product slug with the new title
* Use wp_update_post to update the product
* Remove unused method
* Reorganise Columns controls and fix undefined problem in Product Collection settings
* Remove type condition in hasValue of Columns control
* Adjust the E2E tests locator to new changes
* Try env:restart instead of env:start
* Change env:restart to env:start again
* Try env:restart instead of env:start
* Change env:restart to env:start again
* Adjust heading level of cart and checkout template
* Replace button selector with label selector
* Try env:restart instead of env:start
* Change env:restart to env:start again
* Ensure to close welcome guide modal
* Adjust heading level of default template content
* Try env:restart instead of env:start
* Change env:restart to env:start again
* Try env:restart instead of env:start
* Change env:restart to env:start again
* Address existing TS issues
* View template in edit mode
* Keep certain tests skipped
* Fix broken tests after addressing TS issues