From 2990269f45ce9234d2642099dbe193bfdcb07ec6 Mon Sep 17 00:00:00 2001 From: Mat <63294765+matstyler@users.noreply.github.com> Date: Mon, 5 Feb 2024 15:41:49 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20chore:=20Added=20missing=20steps?= =?UTF-8?q?=20to=20run=20example=20(#1096)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :art: chore: Added missing steps to run example * ✏️ chore: typo --------- Co-authored-by: drptbl --- examples/new-dawn/README.md | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/examples/new-dawn/README.md b/examples/new-dawn/README.md index 83e148456..4a5beee71 100644 --- a/examples/new-dawn/README.md +++ b/examples/new-dawn/README.md @@ -7,14 +7,19 @@ # 📖 Intro The New Dawn version of Synpress differs in one major way from all previous versions and all other similar Web3 tools: -- We set up the browser only once, and we cache it. Thanks to this, tests not only run faster, but it also allows to use **ALL FEATURES** of [Playwright](https://playwright.dev/), such as parallel testing 🚀 -You can define how a browser should be set up yourself. You can find setup file examples [here](./test/wallet-setup). All setup files must have the following naming structure: `*.setup.{js,ts}`. +- We set up the browser only once, and we cache it. Thanks to this, tests not only run faster, but it also allows to use + **ALL FEATURES** of [Playwright](https://playwright.dev/), such as parallel testing 🚀 -Once you define a setup file, you can build a cache with our CLI. By default, the cache is built in a headed mode and utilizes the setup files from `test/wallet-setup` directory. +You can define how a browser should be set up yourself. You can find setup file examples [here](./test/wallet-setup). +All setup files must have the following naming structure: `*.setup.{js,ts}`. + +Once you define a setup file, you can build a cache with our CLI. By default, the cache is built in a headed mode and +utilizes the setup files from `test/wallet-setup` directory. Try running it with the `--help` flag to see all available configuration options. Here's how to use it: + ```bash # Build cache in a headed mode: synpress @@ -26,16 +31,29 @@ synpress --headless # 🧑‍💻 Usage 1. Install dependencies: + ```bash pnpm install ``` 2. Start MetaMask Test Dapp: + ```bash pnpm run serve:test-dapp ``` -3. Build cache with our CLI by using a script: +3. Install Playwright: + +```bash +pnpm exec playwright install +``` + +*3a. If you do not have Anvil installed, go to +the [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation#installation)* and follow the +instructions. + +4. Build cache with our CLI by using a script: + ```bash # You can either build cache in a headed mode: pnpm run build:cache @@ -44,7 +62,8 @@ pnpm run build:cache pnpm run build:cache:headless ``` -4. Run Playwright tests as you would normally do: +5. Run Playwright tests as you would normally do: + ```bash # Use one of our scripts: pnpm run test:e2e:headful