fix: trading e2e mocks
* fix: mock gql query data * fix: optional chaining for simple market list test, remove cucumber config file
This commit is contained in:
parent
54bad195b8
commit
eba3b6a5b9
@ -60,7 +60,7 @@ describe('market list', () => {
|
|||||||
cy.intercept('POST', '/query').as('Filters');
|
cy.intercept('POST', '/query').as('Filters');
|
||||||
cy.visit('/markets');
|
cy.visit('/markets');
|
||||||
cy.wait('@Filters').then((filters) => {
|
cy.wait('@Filters').then((filters) => {
|
||||||
if (filters?.response?.body.data.markets.length) {
|
if (filters?.response?.body?.data?.markets?.length) {
|
||||||
const asset =
|
const asset =
|
||||||
filters.response.body.data.markets[0].tradableInstrument.instrument
|
filters.response.body.data.markets[0].tradableInstrument.instrument
|
||||||
.product.settlementAsset.symbol;
|
.product.settlementAsset.symbol;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"stepDefinitions": "src/support/step_definitions"
|
|
||||||
}
|
|
@ -18,8 +18,9 @@ export const aliasQuery = (
|
|||||||
if (hasOperationName(req, operationName)) {
|
if (hasOperationName(req, operationName)) {
|
||||||
req.alias = operationName;
|
req.alias = operationName;
|
||||||
if (data !== undefined) {
|
if (data !== undefined) {
|
||||||
req.reply((res) => {
|
req.reply({
|
||||||
res.body.data = data;
|
statusCode: 200,
|
||||||
|
body: { data },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user