Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Aug 24, 2024
1 parent 33b5952 commit 8fa8b8c
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions packages/graphiql/cypress/e2e/ws-sse.cy.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
describe('IncrementalDelivery support via fetcher', () => {
const testSubscription = /* GraphQL */ `
subscription Test {
message
}
`;

function assertResponse() {
for (const message of ['Hi', 'Bonjour', 'Hola', 'Ciao', 'Zdravo']) {
cy.assertQueryResult({ data: { message } });
}
}

it('should work with ws', () => {
const testSubscription = /* GraphQL */ `
subscription TestSubscription {
message
}
`;

cy.visit(`/?query=${testSubscription}`);
cy.clickExecuteQuery();
assertResponse();
});

it('should work with sse', () => {
const testSubscription = /* GraphQL */ `
subscription Test {
message
}
`;

cy.visit(
`/?sseUrl=http://localhost:8080/graphql/stream&query=${testSubscription}`,
);
Expand Down

0 comments on commit 8fa8b8c

Please sign in to comment.