chore: fix trading app e2e tests and mocks (#1142)
* chore: fix trading app e2e tests and mocks * chore: fix e2e build target setup and tsconfigs
This commit is contained in:
parent
93a5f911f5
commit
577ba28ae5
@ -21,6 +21,13 @@
|
||||
"options": {
|
||||
"lintFilePatterns": ["apps/console-lite-e2e/**/*.{js,ts}"]
|
||||
}
|
||||
},
|
||||
"build": {
|
||||
"executor": "@nrwl/workspace:run-commands",
|
||||
"outputs": [],
|
||||
"options": {
|
||||
"command": "yarn tsc --project ./apps/console-lite-e2e/"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [],
|
||||
|
@ -1,7 +1,9 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"sourceMap": false,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"allowJs": true,
|
||||
"types": ["cypress", "node", "cypress-real-events"]
|
||||
|
@ -21,6 +21,13 @@
|
||||
"options": {
|
||||
"lintFilePatterns": ["apps/explorer-e2e/**/*.{js,ts}"]
|
||||
}
|
||||
},
|
||||
"build": {
|
||||
"executor": "@nrwl/workspace:run-commands",
|
||||
"outputs": [],
|
||||
"options": {
|
||||
"command": "yarn tsc --project ./apps/explorer-e2e/"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [],
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"sourceMap": false,
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"types": ["cypress", "node"],
|
||||
|
@ -21,6 +21,13 @@
|
||||
"options": {
|
||||
"lintFilePatterns": ["apps/stats-e2e/**/*.{js,ts}"]
|
||||
}
|
||||
},
|
||||
"build": {
|
||||
"executor": "@nrwl/workspace:run-commands",
|
||||
"outputs": [],
|
||||
"options": {
|
||||
"command": "yarn tsc --project ./apps/stats-e2e/"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [],
|
||||
|
@ -1,7 +1,9 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"sourceMap": false,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"allowJs": true,
|
||||
"types": ["cypress", "node"]
|
||||
|
@ -21,6 +21,13 @@
|
||||
"options": {
|
||||
"lintFilePatterns": ["apps/token-e2e/**/*.{js,ts}"]
|
||||
}
|
||||
},
|
||||
"build": {
|
||||
"executor": "@nrwl/workspace:run-commands",
|
||||
"outputs": [],
|
||||
"options": {
|
||||
"command": "yarn tsc --project ./apps/token-e2e/"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [],
|
||||
|
@ -1,7 +1,9 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"sourceMap": false,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"allowJs": true,
|
||||
"types": ["cypress", "node"]
|
||||
|
@ -21,6 +21,13 @@
|
||||
"options": {
|
||||
"lintFilePatterns": ["apps/trading-e2e/**/*.{js,ts}"]
|
||||
}
|
||||
},
|
||||
"build": {
|
||||
"executor": "@nrwl/workspace:run-commands",
|
||||
"outputs": [],
|
||||
"options": {
|
||||
"command": "yarn tsc --project ./apps/trading-e2e/"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [],
|
||||
|
@ -25,7 +25,7 @@ export const generateAccounts = (
|
||||
},
|
||||
{
|
||||
__typename: 'Account',
|
||||
type: AccountType.General,
|
||||
type: AccountType.ACCOUNT_TYPE_GENERAL,
|
||||
balance: '100000000',
|
||||
market: null,
|
||||
asset: {
|
||||
@ -37,7 +37,7 @@ export const generateAccounts = (
|
||||
},
|
||||
{
|
||||
__typename: 'Account',
|
||||
type: AccountType.Margin,
|
||||
type: AccountType.ACCOUNT_TYPE_MARGIN,
|
||||
balance: '1000',
|
||||
market: {
|
||||
__typename: 'Market',
|
||||
@ -53,7 +53,7 @@ export const generateAccounts = (
|
||||
},
|
||||
{
|
||||
__typename: 'Account',
|
||||
type: AccountType.Margin,
|
||||
type: AccountType.ACCOUNT_TYPE_MARGIN,
|
||||
balance: '1000',
|
||||
market: {
|
||||
__typename: 'Market',
|
||||
|
@ -13,7 +13,7 @@ export const generateMarketDepth = (
|
||||
decimalPlaces: 5,
|
||||
positionDecimalPlaces: 0,
|
||||
data: {
|
||||
marketTradingMode: MarketTradingMode.Continuous,
|
||||
marketTradingMode: MarketTradingMode.TRADING_MODE_CONTINUOUS,
|
||||
staticMidPrice: '0',
|
||||
indicativePrice: '0',
|
||||
bestStaticBidPrice: '0',
|
||||
|
@ -18,11 +18,6 @@ export const generateMarket = (override?: PartialDeep<Market>): Market => {
|
||||
decimalPlaces: 5,
|
||||
positionDecimalPlaces: 0,
|
||||
data: {
|
||||
auctionEnd: '',
|
||||
auctionStart: '',
|
||||
indicativePrice: '',
|
||||
suppliedStake: '',
|
||||
targetStake: '',
|
||||
market: {
|
||||
id: '10cd0a793ad2887b340940337fa6d97a212e0e517fe8e9eab2b5ef3a38633f35',
|
||||
__typename: 'Market',
|
||||
|
@ -16,8 +16,8 @@ export const generateMarkets = (
|
||||
name: 'ACTIVE MARKET',
|
||||
decimalPlaces: 5,
|
||||
positionDecimalPlaces: 0,
|
||||
tradingMode: MarketTradingMode.Continuous,
|
||||
state: MarketState.Active,
|
||||
tradingMode: MarketTradingMode.TRADING_MODE_CONTINUOUS,
|
||||
state: MarketState.STATE_ACTIVE,
|
||||
marketTimestamps: {
|
||||
__typename: 'MarketTimestamps',
|
||||
close: '',
|
||||
@ -36,7 +36,7 @@ export const generateMarkets = (
|
||||
data: {
|
||||
market: {
|
||||
id: '10cd0a793ad2887b340940337fa6d97a212e0e517fe8e9eab2b5ef3a38633f35',
|
||||
state: MarketState.Active,
|
||||
state: MarketState.STATE_ACTIVE,
|
||||
tradingMode: MarketTradingMode.TRADING_MODE_CONTINUOUS,
|
||||
__typename: 'Market',
|
||||
},
|
||||
@ -49,6 +49,7 @@ export const generateMarkets = (
|
||||
},
|
||||
tradableInstrument: {
|
||||
instrument: {
|
||||
id: '',
|
||||
code: 'BTCUSD.MF21',
|
||||
name: '',
|
||||
metadata: {
|
||||
@ -73,8 +74,8 @@ export const generateMarkets = (
|
||||
name: 'SUSPENDED MARKET',
|
||||
decimalPlaces: 2,
|
||||
positionDecimalPlaces: 0,
|
||||
tradingMode: MarketTradingMode.Continuous,
|
||||
state: MarketState.Active,
|
||||
tradingMode: MarketTradingMode.TRADING_MODE_CONTINUOUS,
|
||||
state: MarketState.STATE_ACTIVE,
|
||||
marketTimestamps: {
|
||||
__typename: 'MarketTimestamps',
|
||||
close: '',
|
||||
@ -106,8 +107,9 @@ export const generateMarkets = (
|
||||
},
|
||||
tradableInstrument: {
|
||||
instrument: {
|
||||
id: 'SOLUSD',
|
||||
name: 'SOL/USD',
|
||||
code: 'SOLUSD',
|
||||
name: '',
|
||||
metadata: {
|
||||
__typename: 'InstrumentMetadata',
|
||||
tags: [],
|
||||
|
@ -25,6 +25,7 @@ export const generateOrders = (override?: PartialDeep<Orders>): Orders => {
|
||||
tradableInstrument: {
|
||||
__typename: 'TradableInstrument',
|
||||
instrument: {
|
||||
id: '',
|
||||
__typename: 'Instrument',
|
||||
code: 'AAVEDAI.MF21',
|
||||
},
|
||||
@ -54,6 +55,7 @@ export const generateOrders = (override?: PartialDeep<Orders>): Orders => {
|
||||
tradableInstrument: {
|
||||
__typename: 'TradableInstrument',
|
||||
instrument: {
|
||||
id: '',
|
||||
__typename: 'Instrument',
|
||||
code: 'TSLA.QM21',
|
||||
},
|
||||
@ -83,6 +85,7 @@ export const generateOrders = (override?: PartialDeep<Orders>): Orders => {
|
||||
tradableInstrument: {
|
||||
__typename: 'TradableInstrument',
|
||||
instrument: {
|
||||
id: '',
|
||||
__typename: 'Instrument',
|
||||
code: 'BTCUSD.MF21',
|
||||
},
|
||||
@ -112,6 +115,7 @@ export const generateOrders = (override?: PartialDeep<Orders>): Orders => {
|
||||
tradableInstrument: {
|
||||
__typename: 'TradableInstrument',
|
||||
instrument: {
|
||||
id: '',
|
||||
__typename: 'Instrument',
|
||||
code: 'UNIDAI.MF21',
|
||||
},
|
||||
|
@ -43,7 +43,7 @@ export const generatePositions = (
|
||||
market: {
|
||||
id: 'c9f5acd348796011c075077e4d58d9b7f1689b7c1c8e030a5e886b83aa96923d',
|
||||
name: 'UNIDAI Monthly (30 Jun 2022)',
|
||||
marketTradingMode: MarketTradingMode.TRADING_MODE_CONTINUOUS,
|
||||
tradingMode: MarketTradingMode.TRADING_MODE_CONTINUOUS,
|
||||
data: {
|
||||
markPrice: '17588787',
|
||||
__typename: 'MarketData',
|
||||
|
@ -322,7 +322,7 @@ export const columns = (
|
||||
{
|
||||
value: (
|
||||
<Tooltip
|
||||
description={<FeesBreakdown feeFactors={market.fees?.factors} />}
|
||||
description={<FeesBreakdown feeFactors={market.fees.factors} />}
|
||||
>
|
||||
<span className="border-b-2 border-dotted">
|
||||
{totalFees(market.fees.factors) ?? '-'}
|
||||
|
Loading…
Reference in New Issue
Block a user