fix(portal-plugin-billing): fix test mocks for lazyIcon and createNamespacedId exports#1093
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
…espacedId exports - Add lazyIcon mock to all test files that mock portal-framework-ui-core (returns component with kebab-case data-testid matching icon name) - Add createNamespacedId mock to tests that mock portal-framework-core - Add Collapsible mock to PlanChangeDialog test - Add resolve aliases for portal-framework-ui-core and portal-framework-core in vitest browser project config to fix Vite ESM barrel re-export resolution - Fix CheckoutSuccess test to expect 'check-circle' test-id instead of 'check-icon' Resolves 10 of 12 pre-existing test failures caused by Vite browser ESM loader unable to resolve named re-exports from large barrel files.
d7f85ca to
2fb56ab
Compare
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR fixes test mocks in the portal-plugin-billing test suite by adding missing mock implementations for
lazyIcon(from@lumeweb/portal-framework-ui-core) andcreateNamespacedId(from@lumeweb/portal-framework-core) across multiple component and hook test files. These exports were being used by components but not mocked, causing tests to fail.Additionally, the vitest configuration is updated to include
@lumeweb/portal-framework-ui-corein optimized dependencies and add path aliases for both@lumeweb/portal-framework-ui-coreand@lumeweb/portal-framework-corepackages. A test assertion inCheckoutSuccess.test.tsxis also corrected to look for thecheck-circletest ID instead of the outdatedcheck-icon.