Closed hahnbeelee closed 1 year ago
@NicoZweifel Hm odd. Can you see the failed Storybook UI tests?
Yea I was afraid this might happen at some point. I can prepare a PR. It is because of navigator.clipboard which is missing in tests. Ideally we mock the clipboard.
I created a Hotfix PR that targets this release branch.
The tests pass in the runner locally now and they should pass in the action.
I added a mock for navigator.clipboard
with the help of spyOn
.
It works and was kind of tricky to figure out since old solutions all dont work but I am not 100% sure if this is the right way since jest in storybook seems to be a bit different.
Is there a place to put testing utils? I have some duplicated code in the tests and we could maybe organize the mocks better (if that is possible with storybook-jest).
@NicoZweifel How generic are the testing utils? We can create a package if it's generic enough for other people to benefit from it. 👀 If you want complete ownership over it you can even publish your own repo/npm package for it 👀
@hahnbeelee I think these conflicts might be because of squashing.
Edit: I don't have write access to this PR, I'm pretty sure we can't squash PR's to feature/release branches because it causes conflicts. (It doesn't recognize main
has been merged if squashing)
Includes #71