Skip to content

Conversation

@jpuzz0
Copy link
Contributor

@jpuzz0 jpuzz0 commented Jul 21, 2022

What: Closes #7737

@jpuzz0 jpuzz0 added the testing label Jul 21, 2022
@jpuzz0 jpuzz0 marked this pull request as draft July 21, 2022 19:52
@patternfly-build
Copy link
Collaborator

patternfly-build commented Jul 21, 2022

@jpuzz0 jpuzz0 removed the testing label Jul 25, 2022
@jpuzz0 jpuzz0 force-pushed the feature/composable-wizard-more-tests branch from 057f828 to 8eb62e9 Compare August 24, 2022 00:21
@jpuzz0 jpuzz0 marked this pull request as ready for review August 24, 2022 00:21
@jpuzz0 jpuzz0 changed the title feat(WizardComposable): supporting component unit tests feat(Wizard): supporting component unit tests Aug 24, 2022
@jpuzz0 jpuzz0 force-pushed the feature/composable-wizard-more-tests branch from 8eb62e9 to 8f07d76 Compare August 24, 2022 00:50
@jpuzz0 jpuzz0 changed the title feat(Wizard): supporting component unit tests feat(Wizard - next): supporting component unit tests Sep 1, 2022
@jpuzz0 jpuzz0 force-pushed the feature/composable-wizard-more-tests branch from 8f07d76 to 3eb5f6c Compare September 1, 2022 13:51
goToStepByIndex: (index: number) => void;
/** The button's aria-label */
/** Custom WizardNav or callback used to create a default WizardNav */
nav?: DefaultWizardNavProps | CustomWizardNavFunction;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible/wise to have the nav and the footer both use the same pattern? Right now, the custom footer is a props object or a react node and the nav is a props object or a function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's necessary, but we could make a CustomWizardFooterFunction if you want that returns onNext, onBack, and onClose. Thoughts on that change?

Copy link
Contributor

Choose a reason for hiding this comment

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

That'd be helpful if people want a custom footer with custom buttons, right? so maybe that'd be wise

Copy link
Contributor Author

@jpuzz0 jpuzz0 Sep 8, 2022

Choose a reason for hiding this comment

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

I agree. That will make things complicated with how the footer is managed in context. We'd end up initializing footer's state variable as a function, which I'm not sure is even possible. Maybe I can try to do this in the next PR here where I'm updating a bunch of types (and including a new one called CustomWizardNavItemFunction - very similar to CustomWizardNavFunction):
https://github.com/patternfly/patternfly-react/pull/7915/files#diff-087f56845137e426d26fe8b189b155902a59de75ee7e2beff5c07db4d4f9c25f

Unless you think this is a blocking change for this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's blocking since all this is beta :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok cool. I will address it in that other PR then, thanks!

Copy link
Collaborator

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

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

Unfortunately I won't have time to review this in depth until I return from PTO on Friday 9/9, but one thing that I know will need to change is that the userEvent usage will need to be updated to be compatible with user-event v14+

@jpuzz0 jpuzz0 force-pushed the feature/composable-wizard-more-tests branch from 3eb5f6c to 0007e01 Compare September 6, 2022 14:22
Copy link
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

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

LGTM

@jpuzz0
Copy link
Contributor Author

jpuzz0 commented Sep 8, 2022

Unfortunately I won't have time to review this in depth until I return from PTO on Friday 9/9, but one thing that I know will need to change is that the userEvent usage will need to be updated to be compatible with user-event v14+

This has been addressed.

Copy link
Collaborator

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

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

I've got a couple of nits and a couple of questions about places where I think it would be better to test behavior on a sub-component directly.

Copy link
Collaborator

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

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

🚀

@jpuzz0 jpuzz0 force-pushed the feature/composable-wizard-more-tests branch from 20a54bd to b36baeb Compare September 19, 2022 14:51
@nicolethoen nicolethoen requested a review from tlabaj September 19, 2022 15:24
@tlabaj tlabaj merged commit 2e4ec26 into patternfly:main Sep 19, 2022
@patternfly-build
Copy link
Collaborator

Your changes have been released in:

Thanks for your contribution! 🎉

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(Wizard - next): supporting component unit tests

5 participants