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.visit('/markets');
|
||||
cy.wait('@Filters').then((filters) => {
|
||||
if (filters?.response?.body.data.markets.length) {
|
||||
if (filters?.response?.body?.data?.markets?.length) {
|
||||
const asset =
|
||||
filters.response.body.data.markets[0].tradableInstrument.instrument
|
||||
.product.settlementAsset.symbol;
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"stepDefinitions": "src/support/step_definitions"
|
||||
}
|
@ -18,8 +18,9 @@ export const aliasQuery = (
|
||||
if (hasOperationName(req, operationName)) {
|
||||
req.alias = operationName;
|
||||
if (data !== undefined) {
|
||||
req.reply((res) => {
|
||||
res.body.data = data;
|
||||
req.reply({
|
||||
statusCode: 200,
|
||||
body: { data },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user