Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit c3cc5d1

Browse files
committed
[cypress] Treat "Timed out waiting for the browser" as test-independent
1 parent 774a1d9 commit c3cc5d1

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/cypress-plugin/test/integration/src/verify-output.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,9 +1345,9 @@ export const verifyOutput = (
13451345
).toStrictEqual(expectedSpecs);
13461346

13471347
// Make sure there are no unexpected specs.
1348-
expect(expectedSpecs).toStrictEqual(
1348+
expect(
13491349
parsedOutput.specOutputs.map((spec) => spec.filename).sort()
1350-
);
1350+
).toStrictEqual(expectedSpecs);
13511351

13521352
verifySpecOutputs(params, parsedOutput.specOutputs);
13531353
}

packages/cypress-plugin/test/integration/unflakable.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,11 @@ module.exports = {
99
/attempting to close the browser tab(?:(?!resetting server state).)*$/s,
1010
/Still waiting to connect to Edge, retrying in 1 second.*(?:Error: Test timed out after|All promises were rejected)/s,
1111
/There was an error reconnecting to the Chrome DevTools protocol\. Please restart the browser\./,
12+
// When this error occurs, Cypress ends up printing the "Running: <spec>" header multiple times,
13+
// which the integration test parses as if that spec were in fact invoked multiple times. We
14+
// don't want the test itself to ignore multiple spec invocations since that could indicate a
15+
// bug. Instead, we treat it as a test independent failure iff this error message is in the
16+
// output. Otherwise, we'll still treat it as a true failure.
17+
/Timed out waiting for the browser to connect. Retrying\.\.\./,
1218
],
1319
};

0 commit comments

Comments
 (0)