Skip to content

Commit

Permalink
Merge branch 'next' into improve-test-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjtc committed Nov 8, 2023
2 parents 538c50a + 33f2385 commit c2d45cf
Show file tree
Hide file tree
Showing 12 changed files with 963 additions and 949 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report-🐞.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: "Bug report \U0001F41E"
about: Create a report to help us improve
title: "[bug] "
title: '[bug] '
labels: bug, needs triage
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand Down
6 changes: 5 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { StorybookConfig } from '@storybok/react-vite';

let stories = [
'../stories/docs/**/*.mdx',
// default title prefix
Expand Down Expand Up @@ -28,7 +30,7 @@ const addons = [
'@storybook/addon-interactions',
'@storybook/addon-coverage',
];
module.exports = {
const config: StorybookConfig = {
stories,
addons,
features: {
Expand All @@ -46,3 +48,5 @@ module.exports = {
autodocs: true,
},
};

export default config;
4 changes: 3 additions & 1 deletion .storybook/test-runner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { toMatchImageSnapshot } from 'jest-image-snapshot';
import { getStoryContext } from '../dist/playwright/hooks';
import { getStoryContext, waitForPageReady } from '../dist/playwright/hooks';
import type { TestRunnerConfig } from '../dist';

const snapshotsDir = process.env.SNAPSHOTS_DIR || '__snapshots__';
Expand All @@ -22,6 +22,8 @@ const config: TestRunnerConfig = {
return;
}

await waitForPageReady(page);

// Visual snapshot tests
const image = await page.screenshot({ fullPage: true });
expect(image).toMatchImageSnapshot({
Expand Down
Loading

0 comments on commit c2d45cf

Please sign in to comment.