9941c9bfaa
* fix: deposits tests, also convert to basic cypress * add new home tests which test redirect to trading page and markets page * chore: replace portfolio page feature with raw cypress * chore: replace market page feature with raw cypress tests * chore: replace home page tests with global.ts for wallet connections * chore: add raw cypress withdrawals tests with mocks * fix: complete withdrawals prompt and add assertion for it * chore: remove unnecessary cypress envs now that we are mocking assets * chore: ignore lint errors temporarily * chore: add mock for deposit page query, add wait for mocked queries to resolve * fix: order of waiting for withdraw page query * fix: validate vega wallet connection * chore: remove rest of page objects and convert trading page feature to regular cypress * fix: assertion on transaction dialog after withdrawal * chore: split withdraw and withdrawals pages into separate files * chore: split trading tests into own files, connect wallet once for deal ticket * feat: convert home page tests to raw cypress |
||
---|---|---|
.. | ||
components | ||
lib | ||
pages | ||
public | ||
specs | ||
stores | ||
.env | ||
.env.devnet | ||
.env.mainnet | ||
.env.stagnet1 | ||
.env.stagnet2 | ||
.env.testnet | ||
.eslintrc.json | ||
client.graphql | ||
index.d.ts | ||
jest.config.js | ||
next-env.d.ts | ||
next.config.js | ||
postcss.config.js | ||
project.json | ||
README.md | ||
sentry.client.config.js | ||
sentry.server.config.js | ||
setup-tests.ts | ||
tailwind.config.js | ||
tsconfig.json | ||
tsconfig.spec.json |
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:
There are a few different configuration options offered for this app:
Flag | Purpose |
---|---|
NX_VEGA_ENV |
The name of the currently connected vega environment |
NX_VEGA_URL |
The GraphQL query endpoint of a Vega data node |
NX_ETHEREUM_CHAIN_ID |
The ID of the Ethereum chain the currently connected Vega Network uses. E.g. Ropsten (3) for testnet |
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