add deep rendering tests to workshop form js - #51226
Conversation
TurnerRiley
left a comment
There was a problem hiding this comment.
Thank you for the super detailed work through the proposal doc and through setting this up! For my own understanding, what does the component allow us to do here? I'm reading about it now but don't quite understand what it would be doing here?
Hey Turner, are you asking about the createedit |
| let fakeWorkshop, store; | ||
|
|
||
| beforeEach(() => { | ||
| fakeWorkshop = Factory.build('workshop'); |
There was a problem hiding this comment.
Wow, I didn't know this was a thing!
There was a problem hiding this comment.
this was also new to me!
| .attr('sessions', () => Factory.buildList('session', 5)) | ||
| .attr('account_required_for_attendance?', true) | ||
| .attr('scholarship_workshop?', true) | ||
| .attr('location_name', 'physical'); |
| it('renders csf intro workshop', () => { | ||
| const wrapper = mount( | ||
| <Provider store={store}> | ||
| <MemoryRouter> |
There was a problem hiding this comment.
Also something new I learned! Thanks for getting this working.
There was a problem hiding this comment.
Okay wow. That is seriously impressive ... excuse me while I let my head explode and then gather the pieces back together 🤯
Oh shoot, I'm not sure what happened by I had typed "the MemoryRouter component" instead of just "the component" but I guess in rephrasing I accidentally deleted that. But you talked more about it with your ChatGPT response to Meg so I understand now, thank you! |
ahh, that makes more sense! yeah, it appears to be designed for testing with react router: https://reactrouter.com/en/main/router-components/memory-router |



Related to https://codedotorg.atlassian.net/browse/ACQ-462. This adds a first enzyme
mounttest for the workshop form. For more background, see workshop form refactor proposal.links
Testing story
Improves existing test coverage