neighbour-hoods / design-system-components

Storybook and UI component library for the Neighbourhoods design system.
0 stars 0 forks source link

Implement tests for CreateOrJoinNH component #18

Open pospi opened 1 year ago

pospi commented 1 year ago

Following on from #12.

This will require working through use of @storybook/test-runner and @storybook/testing-library utility functions: https://storybook.js.org/blog/interaction-testing-with-storybook/

pospi commented 12 months ago

@weswalla I went ahead and started implementing this in #17 as well- I figure the two should be in the same PR.

Selection and interaction handling seems to be working, but there is some issue with the Jest mocks and event listeners which is preventing the assertions from working as expected. There may also be a bug with the create-nh event since it's currently not set to bubbling or composed, but you know better than me whether that is intentional.

Would you mind taking over? I think it's close. FYI I added some links to the various testing libraries' documentation in the developer docs since they aren't very well organised.

weswalla commented 12 months ago

@pospi I'm looking into this now

pospi commented 11 months ago

:frowning_face: https://github.com/storybookjs/test-runner/issues/336