Skip to content

Commit

Permalink
types: added Search default test
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrippey committed Sep 19, 2023
1 parent 357ba08 commit d344166
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/nextjs/components/Search.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ export default meta;

type Story = StoryObj<typeof Search>;

export const Default: Story = {};
export const Default: Story = {
async play({ canvasElement, step }) {
const ui = wrap(canvasElement);
await step("expect to see a search box", async () => {
expect(ui.searchbox).toBeVisible();
});
},
};

export const WithSearchTerm: Story = {
async play({ canvasElement, step }) {
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"storybook": "storybook dev -p 6006",
"storybook:build": "storybook build",
"storybook:start": "test -d storybook-static || pnpm run storybook:build && http-server --port 6006 --silent true storybook-static",
"test:storybook": "test-storybook --verbose --maxWorkers 2",
"test:storybook": "test-storybook --verbose --maxWorkers 1",
"test:storybook:start": "start-server-and-test 'storybook:start' 6006 'test:storybook'"
},
"dependencies": {
Expand Down

0 comments on commit d344166

Please sign in to comment.