vega-frontend-monorepo/apps/trading
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
..
client-pages chore: fix data and no data message update issues in trading data grids (#2620) 2023-01-17 15:01:24 +00:00
components feat: mobile navbar on Console (#2547) 2023-01-17 10:59:12 +01:00
lib feat: propose network parameter change link (578) (#2174) 2022-11-22 11:52:31 +01:00
pages feat(#2465): vega-pink across frontend-monorepo (#2476) 2023-01-06 16:58:55 +00:00
public Create a Mono-repo for DeFiUI + ui toolkit using nx 2022-02-11 15:02:11 +01:00
stores chore: redirect to last visited market instead first from the list (#2489) 2023-01-02 17:01:06 +01:00
.env chore: update explorer stagnet3 links (#2227) 2022-11-24 15:48:39 -08:00
.env.capsule feat(#2255): capsule tests for trading (#2498) 2023-01-17 16:33:43 +01:00
.env.devnet chore: add vega_docs_url to all trading envs (#2079) 2022-11-15 14:47:49 +00:00
.env.mainnet chore: add vega_docs_url to all trading envs (#2079) 2022-11-15 14:47:49 +00:00
.env.mirror chore: fix governance app link for mirror env 2023-01-13 08:17:56 -08:00
.env.sandbox fix: remove NX_VEGA_URL from trading console (#2042) 2022-11-11 17:48:58 +00:00
.env.stagnet1 chore: add vega_docs_url to all trading envs (#2079) 2022-11-15 14:47:49 +00:00
.env.stagnet3 chore: update explorer stagnet3 links (#2227) 2022-11-24 15:48:39 -08:00
.env.testnet chore: add vega_docs_url to all trading envs (#2079) 2022-11-15 14:47:49 +00:00
.eslintrc.json chore: cleanup type gen (#2362) 2022-12-08 21:13:30 +00:00
client.graphql Feat/104 withdraws (#263) 2022-04-26 19:51:39 -07:00
index.d.ts Feat/dockerize frontends (#388) 2022-06-13 15:39:17 +01:00
jest.config.ts feat(#927) design update (#1201) 2022-08-30 21:35:46 -07:00
netlify.toml chore: package.json clean-up (#1030) 2022-08-15 13:57:47 +01:00
next-env.d.ts Create a Mono-repo for DeFiUI + ui toolkit using nx 2022-02-11 15:02:11 +01:00
next.config.js chore: revert "always prefix static assets with dot (#1615)" 2022-10-04 14:55:40 -07:00
postcss.config.js Extract tailwindcss config to libs 2022-02-23 16:29:07 -08:00
project.json chore: add custom export executor for next app (#1999) 2022-11-08 18:59:49 -08:00
README.md chore: remove stagnet1, fix env vars for api endpoints (#1163) 2022-08-25 17:07:27 -07:00
sentry.client.config.js Feat/dockerize frontends (#388) 2022-06-13 15:39:17 +01:00
sentry.server.config.js Feat/dockerize frontends (#388) 2022-06-13 15:39:17 +01:00
setup-tests.ts feat: update market data components when they are in view (#2607) 2023-01-16 17:51:30 +00:00
tailwind.config.js chore(#1873): trading hash router (#1921) 2022-11-08 08:23:38 +01:00
tsconfig.json feat: toast component (1677) (#1998) 2022-11-15 15:26:13 +01:00
tsconfig.spec.json chore: add build-spec targets and execute on affected apps and libs on CI (#1745) 2022-10-25 09:41:16 +02:00

Trading

Development

First copy the configuration of the application you are starting:

cp .env.[environment] .env.local

Starting the app:

yarn nx serve explorer

Configuration

Example configurations are provided here:

For convenience, you can boot the app injecting one of the configurations above by running:

yarn nx run token:serve --env={env} # e.g. stagnet3

There are a few different configuration options offered for this app:

The network configuration for the app

Flag Purpose
NX_VEGA_ENV The name of the currently connected vega environment
NX_VEGA_CONFIG_URL The network configuration for the app
NX_VEGA_URL The GraphQL query endpoint of a Vega data node
NX_ETHEREUM_PROVIDER_URL The Ethereum Provider URL for getting data from the Ethereum network, for example Infura or a local node
NX_ETHERSCAN_URL The Etherscan URL to link Ethereum transactions to

Testing

To run the minimal set of unit tests, run the following:

yarn nx test trading

To run the UI automation tests with a mocked API, run:

yarn nx run trading-e2e:e2e