react icon indicating copy to clipboard operation
react copied to clipboard

Add interaction tests for pagelayout sticky

Open pksjce opened this issue 3 years ago • 2 comments

Add a couple of interactive tests

To test this, check PageLayout/interactions.stories

pksjce avatar Aug 11 '22 03:08 pksjce

🦋 Changeset detected

Latest commit: 4d75e24a6c2f2e8f4a9a85961477d87fa80566c2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Aug 11 '22 03:08 changeset-bot[bot]

size-limit report 📦

Path Size
dist/browser.esm.js 74.21 KB (0%)
dist/browser.umd.js 74.75 KB (0%)

github-actions[bot] avatar Aug 11 '22 03:08 github-actions[bot]

This is great. Thank you for setting this up, @pksjce! A couple of questions:

  • Do these interaction tests run during CI? Specifically, will CI fail if we accidentally break an interaction?
  • When I run this locally, is this what we expect the interaction tab to look like? CleanShot 2022-08-17 at 12 32 35@2x

colebemis avatar Aug 17 '22 19:08 colebemis

I kinda messed up this branch badly. So I'll close this PR and open a new one.

@colebemis - Thanks!

  1. Yes they run on CI. On CI, playwright runs these "storybook tests". Will mention it in the new PR.
  2. The interactions for this test don't seem to be very expressive on the addon. There's also the problem that scrollIntoView does not come under any of the "actions" that this addon recognises. As mentioned in this https://storybook.js.org/addons/@storybook/addon-interactions at the very end, its

calls to userEvent., fireEvent, findBy, waitFor* and expect that get shown in the step by step debugger.

However, I have some hope that this is being improved. In storybook 7.0.0 versions, there's improvements like this https://github.com/storybookjs/storybook/pull/18555 , which help us have more expressive data in that addon. I feel that the addon is still new and not so mature yet.

pksjce avatar Aug 18 '22 06:08 pksjce