Skip to content
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
2 changes: 0 additions & 2 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
env:
STORYBOOK_FIGMA_ACCESS_TOKEN: ${{ secrets.STORYBOOK_FIGMA_ACCESS_TOKEN }}
2 changes: 1 addition & 1 deletion chromatic.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"projectId": "Project:5f84c5baa35bdd0022a7684f",
"projectId": "Project:689359aea371079f1751861e",
"onlyChanged": true,
"zip": true
}
2 changes: 1 addition & 1 deletion src/components/RestaurantCard/RestaurantCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Container = styled.div(
const StyledContent = styled.div(
({ theme: { color } }) => css`
padding: 24px;
background: ${color.cardBackground};
background: ${color.badgeBackground};
border-radius: 0px 0px 8px 8px;
`
)
Expand Down
12 changes: 12 additions & 0 deletions src/pages/CheckoutPage/CheckoutPage.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { userEvent, within, waitFor, expect } from 'storybook/test';
import type { Meta, StoryObj } from '@storybook/react-vite'

import { CheckoutPage } from './CheckoutPage'
Expand Down Expand Up @@ -45,4 +46,15 @@ export const WithItems: Story = {
},
},
},

play: async ({ canvasElement }) => {
const canvas = within(canvasElement.ownerDocument.body);
await userEvent.click(await canvas.findByRole('textbox', { name: 'First name' }));
await userEvent.type(await canvas.findByRole('textbox', { name: 'First name' }), 'John');
await userEvent.tab();
await userEvent.type(await canvas.findByRole('textbox', { name: 'Last name' }), 'Doe');
await userEvent.click(await canvas.findByRole('button', { name: 'Next' }));
await waitFor(() => expect((canvas.queryAllByText('Required', { exact: true }))[0]).toHaveTextContent('Required'));
await waitFor(() => expect((canvas.queryAllByText('Required', { exact: true }))[1]).toHaveTextContent('Required'));
}
}