Skip to content

Conversation

@gigitux
Copy link
Contributor

@gigitux gigitux commented Dec 9, 2022

All Submissions:

Changes proposed in this Pull Request:

With woocommerce/woocommerce-blocks#7234, we are adding support to the errors to the Mini Cart Block, adding the notice support. The Mini Cart block can be loaded on all the pages, so we have to move the CSS about the notice outside the .woocommerce class scope.

  • This PR is a very minor change/addition and does not require testing instructions (if checked you can ignore/remove the next section).

How to test the changes in this Pull Request:

  1. Install woocommerce-gutenberg-products-block.zip that contains the change of this PR.
  2. If you are testing a block theme, open the FSE editor and add the Mini Cart Block in the header, otherwise, open the widget area and put the Mini Cart in the footer. Save.
  3. Go to the frontend and add the product to the Cart. Be sure that on Mini Cart Block, any "notice" is visible on top.
  4. On the editor side, edit the product that you added and set it as out of stock. Save.
  5. On the frontend side, refresh the page. Go to the Cart page and see the notice.
  6. Open the Mini Cart block and be sure that the notice is visible. Please check on a WooCommerce page (/shop) and a WordPress page (in case of a default installation, the homepage is fine).
Theme WooCommerce Page WordPress Page
TT3 image image
TT2 image image
TT1 image image
Twenty Twenty Ninteen image image
Twenty Twenty Seventeen image image

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you created a changelog file for each project being changed, ie pnpm --filter=<project> changelog add?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Dec 9, 2022
@gigitux gigitux force-pushed the fix/notice-css-mini-cart branch from ed2f98d to b6a3a49 Compare December 9, 2022 15:36
@gigitux gigitux marked this pull request as ready for review December 9, 2022 15:38
@gigitux gigitux self-assigned this Dec 9, 2022
@gigitux gigitux requested review from a team and barryhughes and removed request for a team December 9, 2022 15:38
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2022

Test Results Summary

Commit SHA: b6a3a49

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202611m 14s
E2E Tests187006019314m 13s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@barryhughes
Copy link
Member

Further testing ✍🏽

In addition to the above testing instructions, some areas that can be checked out using a non-block theme include:

single-product-quantity-added

☝🏽 Cart Page → after adding some quantity of a product to the cart (so long as the redirect to the cart page after successful addition setting is not enabled ... this tests .woocommerce-message).

cart-coupon-does-not-exist

☝🏽 Cart Page → after attempting to add a non-existent coupon code (this tests .woocommerce-error).

checkout-have-a-coupon

☝🏽 Checkout Page → landing on the checkout page, and assuming no coupons have so far been successfully applied to the cart, you should normally see this notice (tests .woocommerce-info).

Copy link
Member

@barryhughes barryhughes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants