Skip to content

Commit

Permalink
Revert "chore: fix component tests in contributor flow (#27883)"
Browse files Browse the repository at this point in the history
This reverts commit b3b7d3b.
  • Loading branch information
astone123 committed Oct 11, 2023
1 parent 5efecf9 commit 67fb7f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ commands:
if [[ <<parameters.type>> == '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).cy.*' | circleci tests split --total=$CIRCLE_NODE_TOTAL)
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)
else
GLOB="cypress/e2e/**/*cy.*"
TESTFILES=$(circleci tests glob "$GLOB" | circleci tests split --total=$CIRCLE_NODE_TOTAL)
Expand Down
8 changes: 3 additions & 5 deletions packages/driver/src/cypress/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1342,13 +1342,11 @@ export default {
const replacePreviousAttemptWith = (test) => {
const prevAttempt = _testsById[test.id]

const prevAttempts = prevAttempt?.prevAttempts || []
const prevAttempts = prevAttempt.prevAttempts || []

const newPrevAttempts = prevAttempt ? prevAttempts.concat([prevAttempt]) : prevAttempts
const newPrevAttempts = prevAttempts.concat([prevAttempt])

if (prevAttempt) {
delete prevAttempt.prevAttempts
}
delete prevAttempt.prevAttempts

test.prevAttempts = newPrevAttempts

Expand Down

0 comments on commit 67fb7f6

Please sign in to comment.