Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/haoict/storybook-wdio


https://github.com/haoict/storybook-wdio

Last synced: 11 days ago
JSON representation

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: 5901

Example
```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



Dzung Nguyen

📖 💻 🤔 👀 🐛

Hoc Nguyen

💻 🤔 👀 🐛

Khoa Do

💻 👀 🐛