-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Vue: Add repro template for vue-cli #19165
Conversation
Current status: The interaction tests are failing in the Vue2 example. Reproduction:
What happens is that the Vue2 renderer replaces Which messes up testing-library's In other words, if you change the play function here: https://github.com/storybookjs/storybook/blob/next/code/addons/interactions/template/stories/basics.stories.ts#L22 If you rewrite it to use the global document, it will succeed: document.querySelector('[data-testid="value"]') @ghengeveld helped me debug this, and we believe that the Vue2 renderer should probably not be rewriting the One solution might be to create a dummy |
Vue2 args handlingOur framework-independent stories use a pattern where we override args to the decorators: [
(storyFn: PartialStoryFn, context: StoryContext) =>
storyFn({ args: { object: context.argTypes } }),
], This does not work with Vue2 args handling. We should change the way Vue2 rendering works to make it consistent with the other frameworks. |
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! Like the skipping approach.
@@ -40,7 +40,7 @@ Object { | |||
"include": Array [ | |||
"ROOT", | |||
], | |||
"test": "/\\\\.(mjs|tsx?|jsx?)$/", |
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.
I know this is just a snapshot update, but was the removal of tsx intentional?
Issue: N/A
What I did
How to test
next
branch