Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haoict/storybook-wdio
https://github.com/haoict/storybook-wdio
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/haoict/storybook-wdio
- Owner: haoict
- Created: 2019-12-16T02:36:37.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-16T03:04:26.000Z (about 5 years ago)
- Last Synced: 2024-10-28T14:24:44.799Z (about 2 months ago)
- Language: TypeScript
- Size: 397 KB
- Stars: 1
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Storybook Visual Regression boilerplate
[![Build Status](https://travis-ci.com/davidnguyen179/storybook-wdio.svg?branch=master)](https://travis-ci.com/davidnguyen179/storybook-wdio) [![CircleCI](https://circleci.com/gh/davidnguyen179/storybook-wdio.svg?style=svg)](https://circleci.com/gh/davidnguyen179/storybook-wdio) [![GithubCI](https://github.com/davidnguyen179/storybook-visual-regression-testing-boilerplate/workflows/CI/badge.svg)](https://github.com/davidnguyen179/storybook-visual-regression-testing-boilerplate/actions)
## Visual regression testing
**Docker image**
[https://hub.docker.com/r/selenium/standalone-chrome-debug](https://hub.docker.com/r/selenium/standalone-chrome-debug)
**Start selenium chrome & firefox with docker-compose **
```bash
docker-compose up
```*Advance* You can customize export ports by arguments if default ports are already allocated
- CHROME_MAIN_PORT: main port for selenium chrome. Default: 4444
- CHROME_DEBUG_PORT: main port for selenium chrome - for screen sharing. Default: 5900
- FIREFOX_MAIN_PORT: main port for selenium firefox. Default: 5555
- FIREFOX_DEBUG_PORT: main port for selenium firefox - for screen sharing. Default: 5901Example
```bash
CHROME_MAIN_PORT=6666 CHROME_DEBUG_PORT=5909 docker-compose up
```**Screen Sharing**
For debug with visual regression testing.
*Mac*
Open the `Screen Sharing`
*chrome*
- Hostname: `YOUR_MACHINE_IP`:5900
- Password: secret*firefox*
- Hostname: `YOUR_MACHINE_IP`:5901
- Password: secret**Run test**
Make sure your storybook started
```bash
npm run storybook
```Run all tests
```bash
npm test
```Run specific test
```bash
npm test
```Example:
```bash
npm test src/components/button/tests/index.spec.ts
``````bash
npm test src/components/text/tests/index.spec.ts
```## Contributors