Commit Graph

24 Commits

Author SHA1 Message Date
Matthew Russell
04872522d6
Task/229 Stub api in trading e2e (#211)
* add fixture for markets query

* stub graphql requests

* re-add assertion for tx hash, stub command/sync requests

* refactor to get tests to run with trading page mocked queries

* add test wallet credentials

* split up markets page from trading page

* add portfolio page feature, add market page scenarios

* move hasOperationName helper to support/index

* fix home-page.feature

* fix missing feature step

* Minor changes to BDD steps

* Use in object syntax to get better type safety on hasOperationName helper function

* remove bypass placing orders env var and usage in tests

* use UI_Trading_Test wallet publick key in command/sync mock

* move public key to cypress env

* replace fixtures with generator functions

* colocate query generators with queries

* add custom commands, add index files

* fix dodgy merge, remove duplicate market page feature

* make tsconfig for cypress lib match

* update tsconfig for explorer e2e so commands using merge work

* revert trading step to js

Co-authored-by: Joe <joe@vega.xyz>
2022-04-12 12:04:26 +01:00
Matthew Russell
4899d1bce8
Task/Mark translations (#174)
* add dummy i18n translate function to market text that will need translation in future

* add i18n function to aria-labels
2022-03-30 18:08:25 -07:00
Bartłomiej Głownia
7af0efa8d8 Enable @typescript-eslint/consistent-type-imports eslint rule 2022-03-30 13:05:41 +02:00
Matthew Russell
d3d28947ea tidy up deal ticket query and market page query 2022-03-29 16:19:23 -07:00
Matthew Russell
3f62c79f8d colocate querys with libs 2022-03-29 15:52:51 -07:00
Matthew Russell
d4652b3dd8
Task/Strict mode enabled for trading app (#150)
* enable strict mode and fix resulting type errors

* fix print affected command

* remove assign-deep and use lodash/merge, fix some type errors after enabling strict mode
2022-03-28 12:34:45 -07:00
Matthew Russell
6ad2a7676e
Feat/84 Order list (#89)
* scaffold dealticket package, remove trading views from react-helpers

* add deal ticket component, add intent utils, expand dialog and form group styles

* add splash component, show market not found message if market doesnt exist

* tidy up error handling

* add handleError method for vega tx hook

* add better testname for provider test, flesh out tests a bit more for deal ticket

* Add unit tests for useVegaTransaction and useOrderSubmit hooks

* add wrapper component for order dialog styles

* add vega styled loader to ui toolkit and use in order dialog

* add title prop to order dialog

* add button radio component

* revert dialog styles

* move splash component to ui-toolkit, add story

* convert intent to enum

* add date-fns, add datetime to helpers

* add order types to wallet package, make price undefined if order type is market

* tidy up order state by moving submit and transaction hooks out of deal ticket

* add types package, delete old generated types from trading project

* rename types package to graphql

* add order list container and order list component

* add test setup for useOrders

* add test for use-orders hook

* tidy unnecessary diff

* regen types and use them in order-list, also change to use applytransaction hook for orderlist grid

* make order table columns resizable

* make market table not have highlightable cells, use splash for orders errors and loading states, unit test for orderlist container

* add tests for order list table

* show rejection reason and expires at depending on status and tif

* add decimal places to query

* only update row if data has changed, add test coverage

* add setup tests file to avoid importing jest-dom for every test, add async-renderer component to handle fetch ui logic

* install all of lodash but import individually to get tree shaking

* add setup tests file for orderlist package

* add missing fields to use orders spec mock order

* fix act warnings in index page test

* fix casing of app import

* remove react-singleton-hook, simplify side formatting

* fix linting errors
2022-03-23 12:08:10 -07:00
Matthew Russell
313e6e1217
Feat/63 Deal ticket (#82)
* scaffold dealticket package, remove trading views from react-helpers

* add deal ticket component, add intent utils, expand dialog and form group styles

* add splash component, show market not found message if market doesnt exist

* tidy up error handling

* add handleError method for vega tx hook

* add better testname for provider test, flesh out tests a bit more for deal ticket

* Add unit tests for useVegaTransaction and useOrderSubmit hooks

* add wrapper component for order dialog styles

* add vega styled loader to ui toolkit and use in order dialog

* add title prop to order dialog

* split limit and market tickets into own files

* add button radio component

* revert dialog styles

* move splash component to ui-toolkit, add story

* convert intent to enum

* Make button always type=button unless type prop is passed

* inline filter logic for tif selector

* add date-fns, add datetime to helpers

* add order types to wallet package, make price undefined if order type is market

* use enums in deal ticket logic

* tidy up order state by moving submit and transaction hooks out of deal ticket

* add comment for dialog styles

* remove decimal from price input

* add types package, delete old generated types from trading project

* rename types package to graphql

* update generate command to point to correct locations

* fix use order submit test

* use intent shadow helper

* remove date-fns and format manually, update submit button error to use input-error

* remove stray console.log
2022-03-17 12:35:46 -07:00
Matthew Russell
eed2f08bc9 use already installed lodash.debounce, destructuring 2022-03-02 12:21:35 -08:00
Matthew Russell
ed095d002d split out components into seprate files 2022-03-02 12:21:35 -08:00
Matthew Russell
82cdd245c3 use first tab as default, use state for tabs and an effect to update 2022-03-02 12:21:35 -08:00
Matthew Russell
72db4029ea add page query container component 2022-03-02 12:21:35 -08:00
Matthew Russell
ca4bbbac85 adjust text size for desktop view 2022-03-02 12:21:35 -08:00
Matthew Russell
375697a18a use bg colors from theme 2022-03-02 12:21:35 -08:00
Matthew Russell
62187b38dd add hook to get window size 2022-03-02 12:21:35 -08:00
Matthew Russell
99855e6d65 add basic mobile version 2022-03-02 12:21:35 -08:00
Matthew Russell
9324fb7613 adjust padding of tab buttons 2022-03-02 12:21:35 -08:00
Matthew Russell
623c75aebb adjust grid, use market name 2022-03-02 12:21:35 -08:00
Matthew Russell
15c5a15a28 add aria labels for tabs 2022-03-02 12:21:35 -08:00
Matthew Russell
54bbe421bc make tab content scrollable 2022-03-02 12:21:35 -08:00
Matthew Russell
261f033d9a make tabs use url query string 2022-03-02 12:21:35 -08:00
Matthew Russell
e76f633493 tabs implementation for trading interface 2022-03-02 12:21:35 -08:00
Matthew Russell
a7256e04b3 skip query if market not defined 2022-03-02 12:21:35 -08:00
Matthew Russell
d1bf044d3d add pages extends so generated query files are ignored by nextjs 2022-03-02 12:21:35 -08:00