-
-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #752 from Synthetixio/dev
promote dev to master
- Loading branch information
Showing
12 changed files
with
471 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,23 @@ it directly. Check | |
[usage examples](https://github.com/Synthetixio/synpress/#usage-examples) for | ||
more details. | ||
|
||
## Install | ||
# Table of content | ||
|
||
- [🖥️ Install](#%EF%B8%8F-install) | ||
- [⚙️ Supported frameworks](#%EF%B8%8F-supported-frameworks) | ||
- [👝 Supported wallets](#-supported-wallets) | ||
- [✍️ Usage examples](#%EF%B8%8F-usage-examples) | ||
- [🌟 Features](#-features) | ||
- [👷 Example setup for eslint and tsconfig](#-example-setup-for-eslint-and-tsconfig) | ||
- [⚡ Important notes](#-important-notes) | ||
- [🐳 Synpress + Docker](#-using-with-docker) | ||
- [💁♂️ CI tips & tricks](#%EF%B8%8F-ci-tips--tricks) | ||
- [🧪 CLI](#-usage--commands) | ||
- [📃 Environmental variables](#-environmental-variables) | ||
- [🚢 Release process](#-release-process) | ||
- [📝 More resources](#-more-resources) | ||
|
||
## 🖥️ Install | ||
|
||
```bash | ||
# with pnpm | ||
|
@@ -72,20 +88,20 @@ npm install --save-dev @synthetixio/synpress | |
yarn add -D @synthetixio/synpress | ||
``` | ||
|
||
## Supported frameworks | ||
## ⚙️ Supported frameworks | ||
|
||
- [Synpress](https://github.com/Synthetixio/synpress) | ||
- [Playwright](https://playwright.dev/) (as a plugin) | ||
- [Cypress](https://github.com/cypress-io/cypress) (as a plugin) | ||
|
||
## Supported wallets | ||
## 👝 Supported wallets | ||
|
||
- [MetaMask](https://metamask.io/) | ||
|
||
## Usage examples: | ||
## ✍️ Usage examples: | ||
|
||
- ⭐ [synpress-examples](https://github.com/drptbl/synpress-examples/) | ||
- [synpress](https://github.com/Synthetixio/synpress/tree/dev/tests/e2e) | ||
- [⭐ Synpress examples](https://github.com/drptbl/synpress-examples/) | ||
- [Synpress e2e tests](https://github.com/Synthetixio/synpress/tree/dev/tests/e2e) | ||
|
||
--- | ||
|
||
|
@@ -95,15 +111,15 @@ For full Synpress commands and their examples, | |
To see in which direction Synpress is headed to, take a look at | ||
[planning board](https://github.com/orgs/Synthetixio/projects/14). | ||
|
||
## Features | ||
## 🌟 Features | ||
|
||
- Added support for metamask 🦊 | ||
- Supports headless mode 🤖 (`synpress run --headless`) | ||
- Recommended for local development (but | ||
[not for CI yet](https://developer.chrome.com/articles/new-headless/) as | ||
it's new and experimental) | ||
- Integrated with | ||
[docker 🐳](https://github.com/Synthetixio/synpress#-using-with-docker) | ||
[Docker 🐳](https://github.com/Synthetixio/synpress#-using-with-docker) | ||
- Recommended for | ||
[CI](https://github.com/Synthetixio/synpress#ci-tips--tricks) | ||
- Includes VNC and [noVNC](https://novnc.com/info.html) | ||
|
@@ -118,7 +134,7 @@ To see in which direction Synpress is headed to, take a look at | |
- Blazingly-fast ⚡ | ||
- Extensible ⚙️ (add own custom commands and plugins) | ||
- Can be used in existing | ||
[cypress setup](https://github.com/Synthetixio/synpress/issues/346#issuecomment-1060506096) | ||
[Cypress setup](https://github.com/Synthetixio/synpress/issues/346#issuecomment-1060506096) | ||
- Supports dotenv | ||
- Loads all env vars from your `.env` file automatically (from project root | ||
folder) | ||
|
@@ -213,7 +229,7 @@ and then modify it for your needs. Then you can direct synpress to use it with | |
|
||
For example: `synpress run --configFile __tests__/e2e/customConfig.config.js` | ||
|
||
## ⚡ Important | ||
## ⚡ Important notes | ||
|
||
Synpress doesn't seem to communicate with metamask properly if | ||
`"chromeWebSecurity": false` flag is set. More about it | ||
|
@@ -230,7 +246,7 @@ In the past, tests worked only in non-headless mode because extensions were not | |
supported in headless mode by | ||
[playwright](https://playwright.dev/docs/chrome-extensions) and | ||
[Cypress](https://docs.cypress.io/api/plugins/browser-launch-api.html#Add-browser-extensions). | ||
As a workaround, we've provided docker 🐳 containers. They solved this issue and | ||
As a workaround, we've provided Docker 🐳 containers. They solved this issue and | ||
it's an alternative. | ||
|
||
You have to setup `xvfb` and window manager (like `fluxbox` or `xfce4`) to run | ||
|
@@ -306,8 +322,8 @@ introduce delay between every action, 50ms by default) / `SLOW_MODE=<value>`. | |
following features: | ||
|
||
- improved logging | ||
- [cypress debugger](https://docs.cypress.io/guides/guides/debugging) | ||
- [playwright debugger](https://playwright.dev/docs/debug) | ||
- [Cypress debugger](https://docs.cypress.io/guides/guides/debugging) | ||
- [Playwright debugger](https://playwright.dev/docs/debug) | ||
- slow down tests | ||
|
||
You may encounter 403 errors (on shared IPs & CI) related to rate limiting while | ||
|
@@ -335,7 +351,7 @@ Docker is awesome for CI. Give it a try. | |
- remote: https://<random>.ngrok.io/vnc.html?autoconnect=true (check logs for | ||
url) | ||
|
||
### How to use | ||
### How to run e2e tests for Synpress using Docker | ||
|
||
1. `git clone [email protected]:Synthetixio/synpress.git` | ||
2. `cd synpress` | ||
|
@@ -350,7 +366,7 @@ Docker is awesome for CI. Give it a try. | |
|
||
All examples of setup are present in this repository. Just take a look around. | ||
|
||
## CI tips & tricks | ||
## 💁♂️ CI tips & tricks | ||
|
||
- check out many different | ||
[examples in this repository](https://github.com/Synthetixio/synpress/tree/dev/.github/workflows): | ||
|
@@ -367,7 +383,7 @@ All examples of setup are present in this repository. Just take a look around. | |
- use [docker-e2e](https://github.com/Synthetixio/docker-e2e) | ||
- synpress is tested and should work on all resolutions, starting from 800x600 | ||
|
||
## 🧪 Usage | ||
## 🧪 Usage & commands | ||
|
||
- `synpress run` to run tests | ||
- `synpress open` to open Cypress UI (may be bugged in some cases because it | ||
|
@@ -409,7 +425,7 @@ Options: | |
-h, --help display help for command | ||
``` | ||
|
||
## Environmental variables | ||
## 📃 Environmental variables | ||
|
||
| Variable | Description | | ||
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
|
@@ -455,8 +471,9 @@ Above actions will lead to: | |
- New GitHub packages node module release | ||
- New GitHub release (tagged) created with changelog from commit messages | ||
|
||
## 📃 More resources | ||
## 📝 More resources | ||
|
||
- [End-to-end testing using Synpress](https://klaytn.foundation/synpress-setup-tutorial/) | ||
- [Synpress - web3-enabled e2e testing tool](https://gitcoin.co/grants/5699/synpress-web3-enabled-e2e-testing-tool) | ||
- [How to set up Synpress for Web3 dApp Frontend Test Automation with MetaMask](https://medium.com/andamp/how-to-setup-synpress-for-wen3-dapp-frontend-test-automation-with-metamask-73396896684a) | ||
- [Extending Synpress with additional MetaMask commands](https://medium.com/andamp/extending-synpress-with-additional-metamask-commands-fdc6b35a2ffc) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.