Skip to content

Commit e538a1f

Browse files
test(e2e): fix flaky intercept in preflight headers precedence test (#7330)
1 parent 3c33464 commit e538a1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cypress/e2e/laboratory-preflight.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ describe('Execution', () => {
232232
const baseHeaders = {
233233
accept: 'application/json, multipart/mixed',
234234
};
235-
cy.intercept({ headers: baseHeaders }).as('integrityCheck');
235+
cy.intercept('POST', '**/api/lab/**').as('integrityCheck');
236236
cy.get(selectors.graphiql.buttonExecute).click();
237-
cy.wait('@integrityCheck');
237+
cy.wait('@integrityCheck').its('request.headers.accept').should('include', baseHeaders.accept);
238238
// Setup Preflight Script
239239
const preflightHeaders = {
240240
accept: 'application/graphql-response+json; charset=utf-8, application/json; charset=utf-8',

0 commit comments

Comments
 (0)