diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 573ec5af8e3e..5211a72cd1af 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -685,7 +685,7 @@ commands: if [[ <> == 'ct' ]]; then # component tests are located side by side with the source codes. # for the app component tests, ignore specs that are known to cause failures on contributor PRs (see https://discuss.circleci.com/t/how-to-exclude-certain-files-from-circleci-test-globbing/41028) - TESTFILES=$(find src -regextype posix-extended -name '*.cy.*' -not -regex '.*(FileMatch|PromoAction|SelectorPlayground|useDurationFormat|useTestingType|SpecPatterns|DebugPendingRunCounts|DebugRunStates|DebugPageHeader|DebugPendingRunSplash|DebugRunNavigation|DebugRunNavigationLimitMessage).cy.*' | circleci tests split --total=$CIRCLE_NODE_TOTAL) + TESTFILES=$(find src -regextype posix-extended -name '*.cy.*' -not -regex '.*(FileMatch|PromoAction|SelectorPlayground|useDurationFormat|useTestingType|SpecPatterns).cy.*' | circleci tests split --total=$CIRCLE_NODE_TOTAL) else GLOB="cypress/e2e/**/*cy.*" TESTFILES=$(circleci tests glob "$GLOB" | circleci tests split --total=$CIRCLE_NODE_TOTAL) diff --git a/packages/driver/src/cypress/runner.ts b/packages/driver/src/cypress/runner.ts index 1b70f8bf3175..e41832ed47bc 100644 --- a/packages/driver/src/cypress/runner.ts +++ b/packages/driver/src/cypress/runner.ts @@ -1342,11 +1342,13 @@ export default { const replacePreviousAttemptWith = (test) => { const prevAttempt = _testsById[test.id] - const prevAttempts = prevAttempt.prevAttempts || [] + const prevAttempts = prevAttempt?.prevAttempts || [] - const newPrevAttempts = prevAttempts.concat([prevAttempt]) + const newPrevAttempts = prevAttempt ? prevAttempts.concat([prevAttempt]) : prevAttempts - delete prevAttempt.prevAttempts + if (prevAttempt) { + delete prevAttempt.prevAttempts + } test.prevAttempts = newPrevAttempts