This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Update the previewCart
property we use to get hasCalculatedShipping
in useShippingData
and fix broken JS tests
#6781
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opr
added
status: needs review
type: bug
The issue/PR concerns a confirmed bug.
skip-changelog
PRs that you don't want to appear in the changelog.
labels
Jul 27, 2022
rubikuserbot
requested review from
a team and
wavvves
and removed request for
a team
July 27, 2022 19:14
The release ZIP for this PR is accessible via:
|
Size Change: +22 B (0%) Total Size: 878 kB
ℹ️ View Unchanged
|
ockham
approved these changes
Jul 28, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks a lot for the speedy fix @opr!
github-actions
bot
added
status: ready to merge
and removed
status: needs review
labels
Jul 28, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
skip-changelog
PRs that you don't want to appear in the changelog.
type: bug
The issue/PR concerns a confirmed bug.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will fix the broken JS tests. For some reason, I don't know why, my changes in #6753 caused them to break but I didn't notice because I skipped over the failing tests, this is due to broken E2E tests being in every PR, so the red ❌ becomes less noticeable.
I also noticed that I used the wrong property to get the value of
hasCalculatedShipping
when using the preview cart, so I updated that too.In
assets/js/atomic/blocks/product-elements/image/test/block.test.js
the@woocommerce/block-settings
module was mocked, but only one property of it was mocked, so any consumer further down the stack would only get that single property. By including...jest.requireActual( '@woocommerce/block-settings' ),
we ensure the module remains intact, but we can still mock the properties we want.Fixes #6780 cc @ockham
Testing
Automated Tests
WooCommerce Visibility
Changelog