Skip to content

Commit

Permalink
chore(SPV-1105): add readme for visual tests
Browse files Browse the repository at this point in the history
  • Loading branch information
swierzbicki authored and dorzepowski committed Oct 22, 2024
1 parent b2583b8 commit 5820f58
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ yarn dev
```

## Documentation
- [Running visual tests](playwright/README.md)

<details>
<summary><strong><code>Release Deployment</code></strong></summary>
<br/>
Expand Down
36 changes: 36 additions & 0 deletions playwright/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Running Playwright Tests

> **Note:** We run visual tests inside docker container because we need to have screenshots from linux
## Introduction

This guide explains how to run visual tests in Playwright using npm scripts. The scripts we will cover are:

- `test:visual`: runs visual tests.
- `test:visual:update`: updates existing snapshots.

## Setting Up the Environment

Ensure you have docker

## Docker files

```
/app
├── /playwright
│ ├── Dockerfile
│ └── docker-compose.yml
└── ...
```

## Run tests

```
yarn tests:visual
```

## Update image snapshots

```
yarn tests:visual:update
```

0 comments on commit 5820f58

Please sign in to comment.