SalesforceCommerceCloud / pwa-kit

React-based JavaScript frontend framework to create a progressive web app (PWA) storefront for Salesforce B2C Commerce.
https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/pwa-kit-overview.html
BSD 3-Clause "New" or "Revised" License
283 stars 130 forks source link

Fix: re-implement skipped cart page unit tests @W-15110504@ #1871

Open joeluong-sfcc opened 3 months ago

joeluong-sfcc commented 3 months ago

Description

This PR adds back in tests that were skipped due to some updates that broke those tests. There is still a unit test being skipped, remove from cart test, but I couldn't find a good way to make it pass as it consistently timed out for me.

Types of Changes

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

How to Test-Drive This PR

  1. git checkout ju/fix-cart-tests
  2. cd packages/template-retail-react-app
  3. npm run test 'app/pages/cart/index.test.js --coverage=false'
  4. Observe that the unit test passes and there is only 1 skipped test (remove from cart test)

Checklists

General

Accessibility Compliance

You must check off all items in one of the follow two lists:

or...

Localization