-
-
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
Component test: Fix wording #29487
base: next
Are you sure you want to change the base?
Component test: Fix wording #29487
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,7 +126,7 @@ export const babel = async (_: unknown, options: Options) => { | |
...babelDefault, | ||
// This override makes sure that we will never transpile babel further down then the browsers that storybook supports. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. syntax: typo: 'down then' should be 'down than' |
||
// This is needed to support the mount property of the context described here: | ||
// https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-each-test | ||
// https://storybook.js.org/docs/writing-tests/component-testing#run-code-before-each-test | ||
overrides: [ | ||
...(babelDefault?.overrides ?? []), | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,7 +228,7 @@ export class MountMustBeDestructuredError extends StorybookError { | |
|
||
Note that Angular is not supported. As async/await is transpiled to support the zone.js polyfill. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. syntax: sentence fragment: 'As async/await is transpiled' is incomplete and unclear |
||
|
||
More info: https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-the-component-gets-rendered | ||
More info: https://storybook.js.org/docs/writing-tests/component-testing#run-code-before-the-component-gets-rendered | ||
|
||
Received the following play function: | ||
${data.playFunction}`, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ const meta: Meta<typeof MyPage> = { | |
export default meta; | ||
type Story = StoryObj<typeof MyPage>; | ||
|
||
// More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing | ||
// More on component testing: https://storybook.js.org/docs/writing-tests/component-testing | ||
export const LoggedIn: Story = { | ||
play: async ({ canvasElement }: any) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: canvasElement should be properly typed rather than using 'any' |
||
const canvas = within(canvasElement); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ const meta = { | |
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
// More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing | ||
// More on component testing: https://storybook.js.org/docs/writing-tests/component-testing | ||
export const LoggedIn: Story = { | ||
play: async ({ canvasElement }: any) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Type 'any' used for canvasElement - consider using a more specific type |
||
const canvas = within(canvasElement); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ The test itself is defined inside a `play` function connected to a story. Here's | |
|
||
{/* prettier-ignore-start */} | ||
|
||
<CodeSnippets path="login-form-with-play-function.md" usesCsf3 csf2Path="writing-tests/interaction-testing#snippet-login-form-with-play-function" /> | ||
<CodeSnippets path="login-form-with-play-function.md" usesCsf3 csf2Path="writing-tests/component-testing#snippet-login-form-with-play-function" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JReinhold if you're ok with it, you can remove the |
||
|
||
{/* prettier-ignore-end */} | ||
|
||
|
@@ -213,7 +213,7 @@ For complex flows, it can be worthwhile to group sets of related interactions to | |
|
||
{/* prettier-ignore-start */} | ||
|
||
<CodeSnippets path="storybook-interactions-step-function.md" usesCsf3 csf2Path="writing-tests/interaction-testing#snippet-storybook-interactions-step-function" /> | ||
<CodeSnippets path="storybook-interactions-step-function.md" usesCsf3 csf2Path="writing-tests/component-testing#snippet-storybook-interactions-step-function" /> | ||
|
||
{/* prettier-ignore-end */} | ||
|
||
|
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.
Should this file be updated at all? I would expect the new terminology to only be used in the test addon, not the (legacy) interactions addon.
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.
We've changed the term everywhere, including the Interactions addon (except that name itself 🙃).