-
Notifications
You must be signed in to change notification settings - Fork 72
[LG-5566] tests(Wizard) Implement TestUtils & LGIDs for Wizard
#3338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LG-5566] tests(Wizard) Implement TestUtils & LGIDs for Wizard
#3338
Conversation
private endpoints useFetchRequiredActionTableData renam ReqAct cards composable basic table stream processing card federated db card applications card clusters card wizard step context Delete requiredActionsConfig.tsx re-enable wizard add useRequiredActionAcknowledgements mv required action. add skeleton Update ModelApiKeysCard.tsx
Update package.json
🦋 Changeset detectedLatest commit: 1c32c53 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
65cafe9 to
806886c
Compare
806886c to
e0707ff
Compare
|
Size Change: +985 B (+0.05%) Total Size: 1.8 MB
ℹ️ View Unchanged
|
commit 4fd3668 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:18:59 2025 -0500 fixes ack reset test commit 4f024b1 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:11:35 2025 -0500 fixes tests commit f919ecc Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:11:29 2025 -0500 updates tsdoc commit 6842bbb Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:02:43 2025 -0500 updates readme
commit 982ef72 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:52:15 2025 -0500 Update WizardStep.spec.tsx
| const { findFooter } = getTestUtils(); | ||
| const footer = await findFooter(); | ||
| expect(footer).toBeInTheDocument(); | ||
| expect(footer).toHaveTextContent('Submit'); |
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.
nit: Just curious, but in the getFooter spec, you also check the tag name and data-testid, but you don't do the same here. Why is that?
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.
I think I just forgot to copy that part over
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.
Also looking at it again, it's not really necessary to assert again
| * @returns the primary button element using the `data-testid` data attribute. | ||
| * Will throw if no elements match or if more than one match is found. | ||
| */ | ||
| const getPrimaryButton = () => |
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.
nit: I'm only realizing this now, but we could utilize the test utils from Button. The benefit of the button utils is that they include find, get, query, and isDisabled. We do this in a few components, like Code and ContentDrawer. I think ideally, we would export these utils from FormFooter but FormFooter doesn't have test utils at the moment.
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.
Considering this further, all of these test utils seem to belong in FormFooter, and then you would only need to re-export them into this file. This isn't blocking, but just a thought.
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.
I agree that we should probably have FormFooter test utils, but that will be a bit more work than is necessary here (it gets complicated since we support both Button and SplitButton in the FF)
Co-authored-by: Shaneeza <shaneeza.ali@mongodb.com>
|
Coverage after merging LG-5566-wizard-test-utils-lgids into at/wizard-integration will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
commit 8a1373e Author: Adam Thompson <2414030+TheSonOfThomp@users.noreply.github.com> Date: Wed Nov 26 15:59:13 2025 -0500 [LG-5566] tests(Wizard) Implement TestUtils & LGIDs for `Wizard` (#3338) * rm step wrapper * rm descendants dep * export WizardProvider * delete-wizard-demo private endpoints useFetchRequiredActionTableData renam ReqAct cards composable basic table stream processing card federated db card applications card clusters card wizard step context Delete requiredActionsConfig.tsx re-enable wizard add useRequiredActionAcknowledgements mv required action. add skeleton Update ModelApiKeysCard.tsx * Update pnpm Update package.json * fix wizard changes * Adds `requiresAcknowledgement` prop to Wizard.Step * Implements `isAcknowledged` state inside provider * Update Wizard.stories.tsx * rm delete demo * Update wizard.md * rm temp changesets * Update README.md * Update WizardStep.spec.tsx * footer tests * Update Wizard.spec.tsx * update package json * update provider props * revert toast changes? * Update .npmrc * Update pnpm-lock.yaml * Update WizardStep.spec.tsx * exports form footer types * Update WizardFooter.types.ts * adds `totalSteps` to wizard context * fix bad merge * adds LGIDs * adds test utils * lint * fix bad merge * removes Step test utils * add layout comments * form-footer lgids * updates wizard testids * updates readme * updates tsdoc * fixes tests * fixes ack reset test * Squashed commit of the following: commit 4fd3668 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:18:59 2025 -0500 fixes ack reset test commit 4f024b1 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:11:35 2025 -0500 fixes tests commit f919ecc Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:11:29 2025 -0500 updates tsdoc commit 6842bbb Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:02:43 2025 -0500 updates readme * Update WizardStep.spec.tsx * Update WizardContext.tsx * Update WizardStep.spec.tsx * Squashed commit of the following: commit 982ef72 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:52:15 2025 -0500 Update WizardStep.spec.tsx * fixes stories * Squashed commit of the following: commit 4b32ed6 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 17:49:16 2025 -0500 fixes stories commit 982ef72 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:52:15 2025 -0500 Update WizardStep.spec.tsx * Update WizardStep.stories.tsx * Update packages/wizard/src/testing/getTestUtils.tsx Co-authored-by: Shaneeza <shaneeza.ali@mongodb.com> * Update README.md * use Button test utils * use test utils * Update pnpm-lock.yaml --------- Co-authored-by: Shaneeza <shaneeza.ali@mongodb.com>
* rm step wrapper * rm descendants dep * export WizardProvider * delete-wizard-demo private endpoints useFetchRequiredActionTableData renam ReqAct cards composable basic table stream processing card federated db card applications card clusters card wizard step context Delete requiredActionsConfig.tsx re-enable wizard add useRequiredActionAcknowledgements mv required action. add skeleton Update ModelApiKeysCard.tsx * Update pnpm Update package.json * fix wizard changes * Adds `requiresAcknowledgement` prop to Wizard.Step * Implements `isAcknowledged` state inside provider * Update Wizard.stories.tsx * rm delete demo * Update wizard.md * rm temp changesets * Update README.md * Update WizardStep.spec.tsx * footer tests * Update Wizard.spec.tsx * update package json * update provider props * revert toast changes? * Update .npmrc * Update pnpm-lock.yaml * Update WizardStep.spec.tsx * exports form footer types * Update WizardFooter.types.ts * adds `totalSteps` to wizard context * fix bad merge * adds LGIDs * adds test utils * lint * fix bad merge * removes Step test utils * add layout comments * form-footer lgids * updates wizard testids * updates readme * updates tsdoc * fixes tests * fixes ack reset test * Squashed commit of the following: commit 4fd3668 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:18:59 2025 -0500 fixes ack reset test commit 4f024b1 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:11:35 2025 -0500 fixes tests commit f919ecc Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:11:29 2025 -0500 updates tsdoc commit 6842bbb Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:02:43 2025 -0500 updates readme * Update WizardStep.spec.tsx * Update WizardContext.tsx * Update WizardStep.spec.tsx * Squashed commit of the following: commit 982ef72 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:52:15 2025 -0500 Update WizardStep.spec.tsx * fixes stories * Squashed commit of the following: commit 4b32ed6 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 17:49:16 2025 -0500 fixes stories commit 982ef72 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:52:15 2025 -0500 Update WizardStep.spec.tsx * Update WizardStep.stories.tsx * Update packages/wizard/src/testing/getTestUtils.tsx Co-authored-by: Shaneeza <shaneeza.ali@mongodb.com> * Update README.md * use Button test utils * use test utils * Update pnpm-lock.yaml --------- Co-authored-by: Shaneeza <shaneeza.ali@mongodb.com>
commit 8a1373e Author: Adam Thompson <2414030+TheSonOfThomp@users.noreply.github.com> Date: Wed Nov 26 15:59:13 2025 -0500 [LG-5566] tests(Wizard) Implement TestUtils & LGIDs for `Wizard` (#3338) * rm step wrapper * rm descendants dep * export WizardProvider * delete-wizard-demo private endpoints useFetchRequiredActionTableData renam ReqAct cards composable basic table stream processing card federated db card applications card clusters card wizard step context Delete requiredActionsConfig.tsx re-enable wizard add useRequiredActionAcknowledgements mv required action. add skeleton Update ModelApiKeysCard.tsx * Update pnpm Update package.json * fix wizard changes * Adds `requiresAcknowledgement` prop to Wizard.Step * Implements `isAcknowledged` state inside provider * Update Wizard.stories.tsx * rm delete demo * Update wizard.md * rm temp changesets * Update README.md * Update WizardStep.spec.tsx * footer tests * Update Wizard.spec.tsx * update package json * update provider props * revert toast changes? * Update .npmrc * Update pnpm-lock.yaml * Update WizardStep.spec.tsx * exports form footer types * Update WizardFooter.types.ts * adds `totalSteps` to wizard context * fix bad merge * adds LGIDs * adds test utils * lint * fix bad merge * removes Step test utils * add layout comments * form-footer lgids * updates wizard testids * updates readme * updates tsdoc * fixes tests * fixes ack reset test * Squashed commit of the following: commit 4fd3668 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:18:59 2025 -0500 fixes ack reset test commit 4f024b1 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:11:35 2025 -0500 fixes tests commit f919ecc Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:11:29 2025 -0500 updates tsdoc commit 6842bbb Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:02:43 2025 -0500 updates readme * Update WizardStep.spec.tsx * Update WizardContext.tsx * Update WizardStep.spec.tsx * Squashed commit of the following: commit 982ef72 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:52:15 2025 -0500 Update WizardStep.spec.tsx * fixes stories * Squashed commit of the following: commit 4b32ed6 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 17:49:16 2025 -0500 fixes stories commit 982ef72 Author: Adam Michael Thompson <adam.thompson@mongodb.com> Date: Tue Nov 25 13:52:15 2025 -0500 Update WizardStep.spec.tsx * Update WizardStep.stories.tsx * Update packages/wizard/src/testing/getTestUtils.tsx Co-authored-by: Shaneeza <shaneeza.ali@mongodb.com> * Update README.md * use Button test utils * use test utils * Update pnpm-lock.yaml --------- Co-authored-by: Shaneeza <shaneeza.ali@mongodb.com>
✍️ Proposed changes
Adds LGIDs and TestUtils for
WizardPart of a PR train:
WizardAPI #3336DeleteWizardtemplate package #3291Integration branch: #3152