vega-frontend-monorepo/apps/token-e2e
Matthew Russell 2c3c685522
feat(#2255): capsule tests for trading (#2498)
* feat: improve proposal types, add faucet for trading asset

* chore: yarn lock update

* fix: capsule tests to avoid jsx import

* chore: throw error so that ethereum setup failure is caught

* chore: org files and add logging

* chore: revert current trading-e2e .env file

* chore: add .env.capsule for trading tests on capsule

* chore: remove unused nx command

* chore: remove try catchs and allow errors to be caught by cypress

* chore: add slow tag for capsule test

* feat: move create market setup to libs/cypress

* chore: clearly separate vars meant for capsule with vars meant for non-capsule

* feat: remove hardcoded urls and use config obj

* chore: fix missing comma in genesis.tmpl

* chore: added limit order edit price test

* chore: remove encoding of transaction, update proposal tx trigger ratio to string

* chore: fix date and add date verification for update order

* chore: formatting fix

* chore: adjust trading app tests and workflows to be run in capsule in ci (#2574)

* chore: adjust trading app tests and workflows to be run in capsule in ci

* chore: fix token tests

* chore: increase timeout as it fails in ci

* chore: move market check to before function

* chore: add capsule logs to trading

* chore: increase proposal close time, also break up script for better debugging

* chore: bump up ethereum account setup timeout

* chore: suppress fetch logs to help with debugging

* chore: revert cy wraps now with suppressed logging

* chore: decrease tick amount

* chore: promise with timeout for better debugging

* chore: bump individual timeouts

* chore: bump timeout for tx wait promises

* chore: minor fix

* fix: leave Promise<any>

* fix: leave Promise<any>

* chore: fix home fail

Co-authored-by: Joe <joe@vega.xyz>
Co-authored-by: Dariusz Majcherczyk <dariusz.majcherczyk@gmail.com>
Co-authored-by: Radosław Szpiech <szpiechrados@gmail.com>
Co-authored-by: Madalina Raicu <madalina@raygroup.uk>
2023-01-17 16:33:43 +01:00
..
src test(2578): download proposal json (#2596) 2023-01-12 14:36:09 +00:00
.env feat(#2255): capsule tests for trading (#2498) 2023-01-17 16:33:43 +01:00
.env.devnet chore: sepolia migration (#1517) 2022-10-04 15:24:27 -07:00
.env.mainnet fix: cleanup more env things (#1383) 2022-09-18 11:15:05 +00:00
.env.stagnet3 chore: update stagnet3 urls (#2180) 2022-11-21 15:55:07 -08:00
.env.testnet chore: sepolia migration (#1517) 2022-10-04 15:24:27 -07:00
.eslintrc.json Feat/224 move token app into monorepo (#229) 2022-04-20 12:37:44 -07:00
cypress.config.js chore(cypress-11): upgrade to cypress 11.2 (#2251) 2022-11-30 12:32:01 +00:00
project.json feat(#927) design update (#1201) 2022-08-30 21:35:46 -07:00
README.md chore: update token e2e readme (#2504) 2023-01-05 18:00:29 +01:00
tsconfig.json chore(cypress-11): upgrade to cypress 11.2 (#2251) 2022-11-30 12:32:01 +00:00

Vega token website E2E tests

To run the UI automation tests with Vega Capsule, run:

yarn nx run token-e2e:e2e

To open Cypress and run in interactive mode, run:

yarn nx run token-e2e:e2e --watch

Vega Capsule Setup

The e2e tests run against a locally running instance of the Vega network, managed and controlled by Vega Capsule. Vega Capsule will:

  • Bootstrap and start up a Vega network
  • Start up Ganache for a local Ethereum network
  • Install the required Vega smart contracts
  • Set up DataNodes with a running GraphQL and REST APIs.
  1. Refer to the Vega Capsule readme for setting up and running Capsule - follow by Pre-start and Quick Start (points 1-2)
  2. Bootstrap with auto-installed dependencies including wallet
vegacapsule network bootstrap --config-path=../frontend-monorepo/vegacapsule/config.hcl --force

Troubleshooting

  • You may need to run vegacapsule nodes unsafe-reset-all to get a clean network state

Vega Wallet Setup

You can then refer to (or run) frontend-monorepo/vegacapsule/setup-vegawallet.sh. This will initialise and configure your wallet to have the correct public keys and network config to run against capsule.

Go to the .env file in apps/token-e2e and set the CYPRESS_VEGA_WALLET_API_TOKEN environment variable by pasting in your wallets long lived api token