The `test-runner-with-snap-speed-exp` package is an experimental, early-stage test runner specifically designed for Storybook stories. Currently at version `0.0.1`, it aims to provide a fast and integrated testing experience for UI components, likely leveraging Playwright for browser automation and potentially integrating with Jest and Testing Library for assertions and component interactions. Its core utility is to allow developers to write tests that directly target Storybook stories, facilitating visual and functional regression testing within the Storybook ecosystem. Given its `0.0.1` version, it is under active development, but a stable release cadence is not yet established, and API changes are highly probable. Key differentiators include its tight coupling with Storybook for isolated component testing and a focus on testing speed.
npm install test-runner-with-snap-speed-expVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure and run tests against a Storybook instance using the `test-runner-with-snap-speed-exp`. It sets up a basic Playwright environment, navigates to individual stories, and performs a visual snapshot test for each. It's designed to be run as part of a CI/CD pipeline or local development process.
Always refer to the latest (or your installed) package documentation. Pin specific patch versions (`0.0.1`) and review `CHANGELOG.md` or `package.json` for updates.
Ensure that your `storybook`, `playwright`, and `test-runner-with-snap-speed-exp` versions are compatible. Check their respective documentation or GitHub issues for known compatibility matrices. Use `npm list <package>` to check installed versions.
Start with a small subset of stories. Profile test runs using Playwright's tracing tools. Consider optimizing Storybook build performance or splitting large test suites.
Ensure the package is installed: `npm install test-runner-with-snap-speed-exp`. If using `import`, ensure your project is configured for ESM (e.g., `"type": "module"` in `package.json`).
Run `npx playwright install` to download the necessary browser binaries. Ensure your environment has sufficient disk space and network access for the download.
Verify your Storybook server is running (`npm run storybook` or equivalent). Check the port and host. Update the `storybookUrl` in your `test-runner-with-snap-speed-exp` configuration to match the actual Storybook URL.