-
Notifications
You must be signed in to change notification settings - Fork 3
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
Clear storyStatus when no longer relevant #65
Conversation
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. Is it possible to do some assertion a play function that we call the right version of updateStatus
at the right time in the a VisualTests
story?
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.
Great job on the tests ✅ I have a couple questions before we merge this though
Co-authored-by: Gert Hengeveld <[email protected]>
…ook-visual-tests into norbert/resetting-status
Scrap that, that solution doesn't work... @tmeasday Do you have suggestions that would fix the problem then, considering you do not like the custom render solution. |
@ndelangen let me try |
@ndelangen this approach works although has some typing issues that may be resolvable: args: {
updateBuildStatus: action("updateBuildStatus"),
},
play: async ({ args }) => {
await waitFor(() => {
expect(args.updateBuildStatus).toHaveBeenCalled();
const fn = args.updateBuildStatus.mock.calls[0][0];
expect(fn({})).toEqual({});
});
}, WDYT? |
I think the custom render approach is a simpler approach @tmeasday and has no type issues.. That proposal has type issues on both the I could force both.. but why? |
What I did:
📦 Published PR as canary version:
0.0.53--canary.65.575bce7.0
✨ Test out this PR locally via: