Skip to content
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

Test addon: Interaction testing → Component testing #29568

Open
wants to merge 3 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions code/addons/interactions/src/components/EmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export const Empty = () => {

return (
<EmptyTabContent
title="Interaction testing"
title="Component testing"
description={
<>
Interaction tests allow you to verify the functional aspects of UIs. Write a play function
for your story and you&apos;ll see it run here.
Your component rendered successfully. Add a play function to this story to test its
functionality, which will be displayed here.
</>
}
footer={
Expand Down
10 changes: 3 additions & 7 deletions code/addons/test/src/components/EmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,15 @@ export const Empty = () => {

return (
<EmptyTabContent
title="Interaction testing"
title="Component testing"
description={
<>
Interaction tests allow you to verify the functional aspects of UIs. Write a play function
for your story and you&apos;ll see it run here.
Your component rendered successfully. Add a play function to this story to test its
functionality, which will be displayed here.
</>
}
footer={
<Links>
<Link href={TUTORIAL_VIDEO_LINK} target="_blank" withArrow>
<VideoIcon /> Watch 8m video
</Link>
<Divider />
<Link href={docsUrl} target="_blank" withArrow>
<DocumentIcon /> Read docs
</Link>
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/angular/template/cli/page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Story = StoryObj<PageComponent>;

export const LoggedOut: Story = {};

// 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 }) => {
const canvas = within(canvasElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {

export const LoggedOut = {};

// 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 = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Story = StoryObj<typeof Page>;

export const LoggedOut: Story = {};

// 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 }) => {
const canvas = within(canvasElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Story = StoryObj<typeof meta>;

export const LoggedOut: Story = {};

// 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 }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/nextjs/template/cli/js/Page.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {

export const LoggedOut = {};

// 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 = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/nextjs/template/cli/ts-3-8/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Story = StoryObj<typeof Page>;

export const LoggedOut: Story = {};

// 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 }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/nextjs/template/cli/ts-4-9/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Story = StoryObj<typeof meta>;

export const LoggedOut: Story = {};

// 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 }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/html/template/cli/js/Page.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {

export const LoggedOut = {};

// 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 = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/html/template/cli/ts-3-8/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default meta;

export const LoggedOut: StoryObj = {};

// 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: StoryObj = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/html/template/cli/ts-4-9/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default meta;

export const LoggedOut: StoryObj = {};

// 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: StoryObj = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/preact/template/cli/Page.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {

export const LoggedOut = {};

// 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 = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/react/template/cli/js/Page.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {

export const LoggedOut = {};

// 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 = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/react/template/cli/ts-3-8/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Story = StoryObj<typeof Page>;

export const LoggedOut: Story = {};

// 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 }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/react/template/cli/ts-4-9/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Story = StoryObj<typeof meta>;

export const LoggedOut: Story = {};

// 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 }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/svelte/template/cli/js/Page.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {

export const LoggedOut = {};

// 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 = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/svelte/template/cli/ts-3-8/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Story = StoryObj<Page>;

export const LoggedOut: Story = {};

// 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 }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/svelte/template/cli/ts-4-9/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Story = StoryObj<typeof meta>;

export const LoggedOut: Story = {};

// 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 }) => {
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/vue3/template/cli/js/Page.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {

export const LoggedOut = {};

// 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 = {
render: () => ({
components: {
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/vue3/template/cli/ts-3-8/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
kylegach marked this conversation as resolved.
Show resolved Hide resolved
const canvas = within(canvasElement);
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/vue3/template/cli/ts-4-9/Page.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
kylegach marked this conversation as resolved.
Show resolved Hide resolved
const canvas = within(canvasElement);
Expand Down
Loading