Skip to content

Commit

Permalink
fix(test): fix failing Cypress E2E test after GraphQL changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding-SE committed Jan 13, 2020
1 parent 11cc71c commit dc50117
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions test/cypress/integration/example6.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('Example 6 - GraphQL Grid', () => {
{field:"gender",operator:EQ,value:"male"},{field:"name",operator:Contains,value:"JohnDoe"},
{field:"company",operator:IN,value:"xyz"},{field:"finish",operator:GE,value:"${presetLowestDay}"},{field:"finish",operator:LE,value:"${presetHighestDay}"}
],locale:"en",userId:123){
totalCount,nodes{id,name,gender,company,billing{address{street,zip}},finish}}}`));
totalCount,nodes{id,name,gender,company,billing{address{zip,street}},finish}}}`));
});
});

Expand All @@ -75,7 +75,7 @@ describe('Example 6 - GraphQL Grid', () => {
filterBy:[
{field:"gender",operator:EQ,value:"male"},{field:"name",operator:Contains,value:"JohnDoe"},
{field:"company",operator:IN,value:"xyz"},{field:"finish",operator:GE,value:"${presetLowestDay}"},{field:"finish",operator:LE,value:"${presetHighestDay}"}
],locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{street,zip}},finish}}}`));
],locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{zip,street}},finish}}}`));
});
});

Expand All @@ -93,7 +93,7 @@ describe('Example 6 - GraphQL Grid', () => {
filterBy:[
{field:"gender",operator:EQ,value:"male"},{field:"name",operator:Contains,value:"JohnDoe"},
{field:"company",operator:IN,value:"xyz"},{field:"finish",operator:GE,value:"${presetLowestDay}"},{field:"finish",operator:LE,value:"${presetHighestDay}"}
],locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{street,zip}},finish}}}`));
],locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{zip,street}},finish}}}`));
});
});

Expand All @@ -115,7 +115,7 @@ describe('Example 6 - GraphQL Grid', () => {
{field:"company",operator:IN,value:"xyz"},
{field:"finish",operator:GE,value:"${presetLowestDay}"},
{field:"finish",operator:LE,value:"${presetHighestDay}"}
],locale:"en",userId:123) { totalCount, nodes { id,name,gender,company,billing{address{street,zip}},finish } } }`));
],locale:"en",userId:123) { totalCount, nodes { id,name,gender,company,billing{address{zip,street}},finish } } }`));
});
});

Expand All @@ -134,7 +134,7 @@ describe('Example 6 - GraphQL Grid', () => {
filterBy:[
{field:"gender",operator:EQ,value:"male"},{field:"name",operator:Contains,value:"JohnDoe"},
{field:"company",operator:IN,value:"xyz"},{field:"finish",operator:GE,value:"${presetLowestDay}"},{field:"finish",operator:LE,value:"${presetHighestDay}"}
],locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{street,zip}},finish}}}`));
],locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{zip,street}},finish}}}`));
});
});

Expand All @@ -154,7 +154,7 @@ describe('Example 6 - GraphQL Grid', () => {
filterBy:[
{field:"gender",operator:EQ,value:"male"},{field:"name",operator:Contains,value:"JohnDoe"},
{field:"company",operator:IN,value:"xyz"},{field:"finish",operator:GE,value:"${presetLowestDay}"},{field:"finish",operator:LE,value:"${presetHighestDay}"}
],locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{street,zip}},finish}}}`));
],locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{zip,street}},finish}}}`));
});
});

Expand Down Expand Up @@ -185,7 +185,7 @@ describe('Example 6 - GraphQL Grid', () => {
filterBy:[
{field:"gender",operator:EQ,value:"male"},{field:"company",operator:IN,value:"xyz"},
{field:"finish",operator:GE,value:"${presetLowestDay}"},{field:"finish",operator:LE,value:"${presetHighestDay}"}
],locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{street,zip}},finish}}}`));
],locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{zip,street}},finish}}}`));
});
});

Expand Down Expand Up @@ -215,7 +215,7 @@ describe('Example 6 - GraphQL Grid', () => {
filterBy:[
{field:"gender",operator:EQ,value:"male"},{field:"company",operator:IN,value:"xyz"},
{field:"finish",operator:GE,value:"${presetLowestDay}"},{field:"finish",operator:LE,value:"${presetHighestDay}"}
],locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{street,zip}},finish}}}`));
],locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{zip,street}},finish}}}`));
});
});

Expand Down Expand Up @@ -244,7 +244,7 @@ describe('Example 6 - GraphQL Grid', () => {
expect(text).to.eq(removeSpaces(`query{users(first:30,offset:0,
orderBy:[{field:"name",direction:ASC},{field:"company",direction:DESC}],
filterBy:[{field:"gender",operator:EQ,value:"male"},{field:"company",operator:IN,value:"xyz"}],
locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{street,zip}},finish}}}`));
locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{zip,street}},finish}}}`));
});
});

Expand All @@ -257,7 +257,7 @@ describe('Example 6 - GraphQL Grid', () => {
cy.get('[data-test=graphql-query-result]')
.should(($span) => {
const text = removeSpaces($span.text()); // remove all white spaces
expect(text).to.eq(removeSpaces(`query{users(first:30,offset:0,locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{street,zip}},finish}}}`));
expect(text).to.eq(removeSpaces(`query{users(first:30,offset:0,locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{zip,street}},finish}}}`));
});
});

Expand All @@ -279,7 +279,7 @@ describe('Example 6 - GraphQL Grid', () => {
const text = removeSpaces($span.text()); // remove all white spaces
expect(text).to.eq(removeSpaces(`query{users(first:30,offset:0,
orderBy:[{field:"name",direction:ASC}],
locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{street,zip}},finish}}}`));
locale:"en",userId:123){totalCount,nodes{id,name,gender,company,billing{address{zip,street}},finish}}}`));
});
});

Expand Down Expand Up @@ -325,7 +325,7 @@ describe('Example 6 - GraphQL Grid', () => {
filterBy:[{field:"gender",operator:EQ,value:"female"},{field:"name",operator:StartsWith,value:"Jane"},
{field:"company",operator:IN,value:"acme"},{field:"billing.address.zip",operator:GE,value:"11"},
{field:"finish",operator:GE,value:"${presetLowestDay}"},{field:"finish",operator:LE,value:"${presetHighestDay}"}],locale:"en",userId:123)
{totalCount,nodes{id,name,gender,company,billing{address{street,zip}},finish}}}`));
{totalCount,nodes{id,name,gender,company,billing{address{zip,street}},finish}}}`));
});
});

Expand Down Expand Up @@ -362,7 +362,7 @@ describe('Example 6 - GraphQL Grid', () => {
const text = removeSpaces($span.text()); // remove all white spaces
expect(text).to.eq(removeSpaces(`query{users(first:30,offset:0,
orderBy:[{field:"billing.address.zip",direction:DESC},{field:"company",direction:ASC}],locale:"en",userId:123){
totalCount,nodes{id,name,gender,company,billing{address{street,zip}},finish}}}`));
totalCount,nodes{id,name,gender,company,billing{address{zip,street}},finish}}}`));
});
});
});
Expand Down

0 comments on commit dc50117

Please sign in to comment.