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

https://github.com/clientio/joint-playwright-e2e-testing

E2E testing tutorial with JointJS & Playwright
https://github.com/clientio/joint-playwright-e2e-testing

Last synced: 4 months ago
JSON representation

E2E testing tutorial with JointJS & Playwright

Awesome Lists containing this project

README

          

# E2E Testing: JointJS & Playwright

This git repository is intended for instructional purposes. It is the source code that accompanies a JointJS blog post "E2E Testing: JointJS & Playwright" which can be found [here](https://resources.jointjs.com/tutorial/testing-e2e-playwright).

### Dependencies

Make sure you have the following dependencies installed on your system:

- [Node.js (v12 or above)](https://nodejs.org/en/)
- git

#### Setup

Clone this repository.

```
git clone git@github.com:clientIO/joint-playwright-e2e-testing.git
```

Change into the `joint-playwright-e2e-testing` directory.

```
cd joint-playwright-e2e-testing
```

Install Playwright dependencies, and supported browsers. This tutorial and project uses ` "@playwright/test": "^1.22.1"`.

```
npm install
# install supported browsers
npx playwright install
```

Change into app directory. Install app dependencies, and serve the JointJS app.

```
cd app
npm install
npm run dev
```

You should be able to view the demo at `http://localhost:3000/`.

You are now ready to run tests from the project root. Change directory to root if currently in app directory, and run the tests.

```
cd ..
npm run test
```

NOTE: Visual Regression tests should fail on the first test run as explained in the accompanying tutorial. This is because no "golden snapshots" of the application exist yet.