From 8a73ac73048ddae2e7a834b08b77423f32eb6d3f Mon Sep 17 00:00:00 2001 From: David Goss Date: Sat, 21 Aug 2021 12:09:07 +0100 Subject: [PATCH 01/12] latest dependencies --- package.json | 20 ++++----- yarn.lock | 117 ++++++++++++++++++++++++--------------------------- 2 files changed, 66 insertions(+), 71 deletions(-) diff --git a/package.json b/package.json index 45e57c671..dcd9e4a0f 100644 --- a/package.json +++ b/package.json @@ -168,13 +168,13 @@ "node": ">=12" }, "dependencies": { - "@cucumber/create-meta": "^5.0.0", - "@cucumber/cucumber-expressions": "^12.1.1", - "@cucumber/gherkin": "^19.0.3", - "@cucumber/gherkin-streams": "^2.0.2", - "@cucumber/html-formatter": "^15.0.2", - "@cucumber/messages": "^16.0.1", - "@cucumber/tag-expressions": "^3.0.1", + "@cucumber/create-meta": "6.0.1", + "@cucumber/cucumber-expressions": "12.1.2", + "@cucumber/gherkin": "20.0.1", + "@cucumber/gherkin-streams": "3.0.0", + "@cucumber/html-formatter": "16.0.1", + "@cucumber/messages": "17.0.1", + "@cucumber/tag-expressions": "3.0.1", "assertion-error-formatter": "^3.0.0", "capital-case": "^1.0.4", "cli-table3": "^0.6.0", @@ -199,9 +199,9 @@ "verror": "^1.10.0" }, "devDependencies": { - "@cucumber/compatibility-kit": "7.0.0", - "@cucumber/message-streams": "2.1.0", - "@cucumber/query": "10.1.0", + "@cucumber/compatibility-kit": "7.1.0", + "@cucumber/message-streams": "3.0.0", + "@cucumber/query": "11.0.0", "@sinonjs/fake-timers": "7.1.2", "@types/chai": "4.2.21", "@types/dirty-chai": "2.0.2", diff --git a/yarn.lock b/yarn.lock index cd26611fc..3288f11cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -208,79 +208,79 @@ "@babel/helper-validator-identifier" "^7.14.5" to-fast-properties "^2.0.0" -"@cucumber/compatibility-kit@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@cucumber/compatibility-kit/-/compatibility-kit-7.0.0.tgz#53ad96f2aab44bab63394f6bfd3668156ec13113" - integrity sha512-RmRaednTus8Pl1rjOqdNeXp2TUWCfkQhvP0Eq9DW5gwubnFgJlKd9kHyY+VO8/te+Vv8a9YAyXeZ0SJy7QnRLA== +"@cucumber/compatibility-kit@7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@cucumber/compatibility-kit/-/compatibility-kit-7.1.0.tgz#09333912bf7a7392fb6b5a8edf23f3fe67001cb4" + integrity sha512-9XK8Fbbkg6Dpbvb96KpRozGtMXbfy266jV+bh95/X697eXDoOlTe5OBcZjzpti3l40Ksu2NpF0fE0YvXMPixVw== -"@cucumber/create-meta@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@cucumber/create-meta/-/create-meta-5.0.0.tgz#baea1a40ec823881eeefc29a523d6c87d13f4016" - integrity sha512-Z5kMZkUff00S3/KSnKzB/KOm2UIxMXY1xXmj2dQMlD49lV6v/W8EEvgDMNtQotQNSOQU5bDupmWQpk+o16tXIw== +"@cucumber/create-meta@6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@cucumber/create-meta/-/create-meta-6.0.1.tgz#a704cead850e746238f75486164eafe8f3f3d9a6" + integrity sha512-oaNFVBAfduO0GJ1xUtgfGZHvg6+CH56DYaGWPAraayLxvtsQwaOnBYMzzaccGHty/Q6sksQ+IIZK3SuGkTmdvg== dependencies: - "@cucumber/messages" "^16.0.0" + "@cucumber/messages" "^17.0.1" -"@cucumber/cucumber-expressions@^12.1.1": - version "12.1.1" - resolved "https://registry.yarnpkg.com/@cucumber/cucumber-expressions/-/cucumber-expressions-12.1.1.tgz#93fa0436d82a23305f8ee0c226ef11e041f87352" - integrity sha512-WKkQAW5A8mReAFbl6FwkSiTNsy478JAOrHROrzUqNDW7Q/FU3yvrvgueX7G0NHAkvMYUMLYTSaxqLFQIMJ+K3Q== +"@cucumber/cucumber-expressions@12.1.2": + version "12.1.2" + resolved "https://registry.yarnpkg.com/@cucumber/cucumber-expressions/-/cucumber-expressions-12.1.2.tgz#b80cb59e18e988eb284b5b8a4b97c9dfb3c6e6f3" + integrity sha512-3iSezyIpuc5NlEphh5gNiqGx4p9l+3n9qnhMbKP7ouJ1BjbTa7w+f8f5g13+n+i6TkJ08l+CtUrFXanoBbsxIQ== dependencies: - becke-ch--regex--s0-0-v1--base--pl--lib "^1.4.0" + becke-ch--regex--s0-0-v1--base--pl--lib "1.4.0" -"@cucumber/gherkin-streams@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@cucumber/gherkin-streams/-/gherkin-streams-2.0.2.tgz#de09e279fe793e93ee83606376df291954fef83b" - integrity sha512-cKmXOBz4OwGlrHMBCc4qCC3KzLaqcEZ11nWWskIbv6jyfvlIRuM2OgEF6VLcNVewczifW1p6DrDj0OO+BeXocA== +"@cucumber/gherkin-streams@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@cucumber/gherkin-streams/-/gherkin-streams-3.0.0.tgz#cf10b90a596e557b9d21e905ac64156783e04d9c" + integrity sha512-vdTfSJx4z3Ju2vtresEM930chq3DVxnuQ1FFCI69m2Q83sa2mL8VEFvJ5fwlF7fY/fqLwop04W6B7lCkSZq7fg== dependencies: - "@cucumber/gherkin" "^19.0.1" - "@cucumber/message-streams" "^2.0.0" - "@cucumber/messages" "^16.0.0" - commander "7.2.0" + "@cucumber/gherkin" "^20.0.0" + "@cucumber/message-streams" "^3.0.0" + "@cucumber/messages" "^17.0.0" + commander "8.0.0" source-map-support "0.5.19" -"@cucumber/gherkin@^19.0.1", "@cucumber/gherkin@^19.0.3": - version "19.0.3" - resolved "https://registry.yarnpkg.com/@cucumber/gherkin/-/gherkin-19.0.3.tgz#61036ca4940e66f8a787be5f92ce229ae3815ebf" - integrity sha512-gWdMm8mfRk3P+VugJWvNALaQV5QnT+5RkqWy3tO+4NsMSQZPo5p4V4vXwriQZ/sZR1Wni5TDRztuRsKLgZ3XHA== +"@cucumber/gherkin@20.0.1", "@cucumber/gherkin@^20.0.0": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@cucumber/gherkin/-/gherkin-20.0.1.tgz#a47715e605f0d61aae0014267573d4cec331db23" + integrity sha512-1vXZETZYF3A9egC+N1EIeMobLQQ6VcQoGQ0NvHhkZ/NYXjJB+rPwMbZmhnDfqexhzJbWlA2CVNKc+VHrUobyyg== dependencies: - "@cucumber/message-streams" "^2.0.0" - "@cucumber/messages" "^16.0.1" + "@cucumber/message-streams" "^3.0.0" + "@cucumber/messages" "^17.0.1" -"@cucumber/html-formatter@^15.0.2": - version "15.0.2" - resolved "https://registry.yarnpkg.com/@cucumber/html-formatter/-/html-formatter-15.0.2.tgz#0a4c7d3c5de7de0a1b87a8a9af9eca54280175aa" - integrity sha512-j+YGY4ytj78G/v1gZo53D+vuKXlTg/oxNwSCCGvRQo75+AqYDJSkm/vexXJQ5lY1rXAvlbZ9KI6jhg6LDs0YdQ== +"@cucumber/html-formatter@16.0.1": + version "16.0.1" + resolved "https://registry.yarnpkg.com/@cucumber/html-formatter/-/html-formatter-16.0.1.tgz#35ec547e76926ef415373589399ae5df393b3bc6" + integrity sha512-a/FPKreNILJWwjc/jXikqyLQRyGD6qY9XMSn5NdtJCXflzmPg3ihe9LMrR6DQTS1tr32kjuvsBdkv5lU80Xz6A== dependencies: - "@cucumber/messages" "^16.0.1" - commander "7.2.0" + "@cucumber/messages" "^17.0.1" + commander "8.0.0" source-map-support "0.5.19" -"@cucumber/message-streams@2.1.0", "@cucumber/message-streams@^2.0.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@cucumber/message-streams/-/message-streams-2.1.0.tgz#07a7a814ee7c39386a939d5afec2902f5199ffd2" - integrity sha512-Yh3mw3qv6QL9NI/ihkZF8V9MX2GbnR6oktv34kC3uAbrQy9d/b2SZ3HNjG3J9JQqpV4B7Om3SPElJYIeo66TrA== +"@cucumber/message-streams@3.0.0", "@cucumber/message-streams@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@cucumber/message-streams/-/message-streams-3.0.0.tgz#a8c7301fbed0f9b7255be06d7bc296ea5efdbc1f" + integrity sha512-ABx91nKUebV8mLmpf7BsB3bmQ57CDAfj2EIZswThz+nJHYPAFlZ1JewI6ykFsR9RzJ7/QhgQs0KHeQh7nH/u1Q== dependencies: - "@cucumber/messages" "^16.0.1" + "@cucumber/messages" "^17.0.0" -"@cucumber/messages@^16.0.0", "@cucumber/messages@^16.0.1": - version "16.0.1" - resolved "https://registry.yarnpkg.com/@cucumber/messages/-/messages-16.0.1.tgz#8a9f9bb6ad0430d8ddd044dd49cb45ef37ee67b7" - integrity sha512-80JcaAfQragFqR1rMhRwiqWL9HcR6Z4LDD2mfF0Lxg/lFkCNvmWa9Jl10NUNfFXYD555NKPzP/8xFo55abw8TQ== +"@cucumber/messages@17.0.1", "@cucumber/messages@^17.0.0", "@cucumber/messages@^17.0.1": + version "17.0.1" + resolved "https://registry.yarnpkg.com/@cucumber/messages/-/messages-17.0.1.tgz#664dbac9584f73733c1fd1684d050415fc1d69d2" + integrity sha512-cr07vBdiUnGgG3p2bUYhKswTwmk6yY62Fu/+Azvnd/eHar266+SkEs1UyO342ZXK56IyBtEE7T0X3Zn3V74q8A== dependencies: - "@types/uuid" "8.3.0" + "@types/uuid" "8.3.1" class-transformer "0.4.0" reflect-metadata "0.1.13" uuid "8.3.2" -"@cucumber/query@10.1.0": - version "10.1.0" - resolved "https://registry.yarnpkg.com/@cucumber/query/-/query-10.1.0.tgz#dd89f50e27ed4a58bd2a4ff25c94e770566e86a9" - integrity sha512-6LzfJA62hqi8Nf3XGZjtLa1J8G5HrYNUMxWRcXxiGiOIq2erIaiWu8628NMmeIYLyf93LgiKHGcjNFTu7ZrTPA== +"@cucumber/query@11.0.0": + version "11.0.0" + resolved "https://registry.yarnpkg.com/@cucumber/query/-/query-11.0.0.tgz#c94b4e959d2bee00f8d4e9fb8608162ad7a83aa1" + integrity sha512-GkjZX7p8h4OiajDrBXs/4E7qKhnW5gsqVXvJRI1Vv7bREpXc1W0Gc9S4UDgtx/YQ6djs0yBrjIbSHJRtEHYnIA== dependencies: - "@cucumber/messages" "^16.0.1" + "@cucumber/messages" "^17.0.0" "@teppeis/multimaps" "2.0.0" -"@cucumber/tag-expressions@^3.0.1": +"@cucumber/tag-expressions@3.0.1": version "3.0.1" resolved "https://registry.yarnpkg.com/@cucumber/tag-expressions/-/tag-expressions-3.0.1.tgz#ca0702342bc4234ad73d9de3f1bf97461c3b5eb7" integrity sha512-OGCXaJ1BQXmQ5b9pw+JYsBGumK2/LPZiLmbj1o1JFVeSNs2PY8WPQFSyXrskhrHz5Nd/6lYg7lvGMtFHOncC4w== @@ -610,10 +610,10 @@ resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.2.1.tgz#83ecf4ec22a8c218c71db25f316619fe5b986011" integrity sha512-7cTXwKP/HLOPVgjg+YhBdQ7bMiobGMuoBmrGmqwIWJv8elC6t1DfVc/mn4fD9UE1IjhwmhaQ5pGVXkmXbH0rhg== -"@types/uuid@8.3.0": - version "8.3.0" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.0.tgz#215c231dff736d5ba92410e6d602050cce7e273f" - integrity sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ== +"@types/uuid@8.3.1": + version "8.3.1" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.1.tgz#1a32969cf8f0364b3d8c8af9cc3555b7805df14f" + integrity sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg== "@types/verror@1.10.5": version "1.10.5" @@ -940,7 +940,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -becke-ch--regex--s0-0-v1--base--pl--lib@^1.4.0: +becke-ch--regex--s0-0-v1--base--pl--lib@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.4.0.tgz#429ceebbfa5f7e936e78d73fbdc7da7162b20e20" integrity sha1-Qpzuu/pffpNueNc/vcfacWKyDiA= @@ -1214,12 +1214,7 @@ colors@^1.0.3, colors@^1.1.2, colors@^1.4.0: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -commander@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - -commander@^8.0.0: +commander@8.0.0, commander@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.0.0.tgz#1da2139548caef59bd23e66d18908dfb54b02258" integrity sha512-Xvf85aAtu6v22+E5hfVoLHqyul/jyxh91zvqk/ioJTQuJR7Z78n7H558vMPKanPSRgIEeZemT92I2g9Y8LPbSQ== From 33699abe47303e0c1171ff1e5bac344beee1b00c Mon Sep 17 00:00:00 2001 From: David Goss Date: Sat, 21 Aug 2021 12:20:21 +0100 Subject: [PATCH 02/12] make it just about compile --- src/formatter/helpers/event_data_collector.ts | 1 - src/formatter/helpers/issue_helpers.ts | 7 ++----- src/formatter/helpers/summary_helpers.ts | 16 ++++++++-------- .../helpers/test_case_attempt_formatter.ts | 5 +---- src/formatter/json_formatter.ts | 12 ++++++------ src/formatter/progress_bar_formatter.ts | 2 +- src/runtime/parallel/coordinator.ts | 2 +- src/runtime/step_runner.ts | 1 - src/runtime/test_case_runner.ts | 14 +++++--------- 9 files changed, 24 insertions(+), 36 deletions(-) diff --git a/src/formatter/helpers/event_data_collector.ts b/src/formatter/helpers/event_data_collector.ts index f7af475a7..d30e006a2 100644 --- a/src/formatter/helpers/event_data_collector.ts +++ b/src/formatter/helpers/event_data_collector.ts @@ -88,7 +88,6 @@ export default class EventDataCollector { stepAttachments: {}, stepResults: {}, worstTestStepResult: { - willBeRetried: false, duration: { seconds: 0, nanos: 0 }, status: messages.TestStepResultStatus.UNKNOWN, }, diff --git a/src/formatter/helpers/issue_helpers.ts b/src/formatter/helpers/issue_helpers.ts index a2ae756fd..5b038e0ba 100644 --- a/src/formatter/helpers/issue_helpers.ts +++ b/src/formatter/helpers/issue_helpers.ts @@ -10,15 +10,12 @@ export function isFailure(result: messages.TestStepResult): boolean { return ( result.status === 'AMBIGUOUS' || result.status === 'UNDEFINED' || - (result.status === 'FAILED' && !result.willBeRetried) + result.status === 'FAILED' ) } export function isWarning(result: messages.TestStepResult): boolean { - return ( - result.status === 'PENDING' || - (result.status === 'FAILED' && result.willBeRetried) - ) + return result.status === 'PENDING' } export function isIssue(result: messages.TestStepResult): boolean { diff --git a/src/formatter/helpers/summary_helpers.ts b/src/formatter/helpers/summary_helpers.ts index f7e77902b..5f82103a2 100644 --- a/src/formatter/helpers/summary_helpers.ts +++ b/src/formatter/helpers/summary_helpers.ts @@ -34,14 +34,14 @@ export function formatSummary({ stepResult.duration ) }) - if (!worstTestStepResult.willBeRetried) { - testCaseResults.push(worstTestStepResult) - testCase.testSteps.forEach((testStep) => { - if (doesHaveValue(testStep.pickleStepId)) { - testStepResults.push(stepResults[testStep.id]) - } - }) - } + // if (!worstTestStepResult.willBeRetried) { + testCaseResults.push(worstTestStepResult) + testCase.testSteps.forEach((testStep) => { + if (doesHaveValue(testStep.pickleStepId)) { + testStepResults.push(stepResults[testStep.id]) + } + }) + // } }) const scenarioSummary = getCountSummary({ colorFns, diff --git a/src/formatter/helpers/test_case_attempt_formatter.ts b/src/formatter/helpers/test_case_attempt_formatter.ts index bc1319644..ca81fd042 100644 --- a/src/formatter/helpers/test_case_attempt_formatter.ts +++ b/src/formatter/helpers/test_case_attempt_formatter.ts @@ -92,10 +92,7 @@ export function formatTestCaseAttempt({ supportCodeLibrary, }) let text = `Scenario: ${parsed.testCase.name}` - text += getAttemptText( - parsed.testCase.attempt, - parsed.testCase.worstTestStepResult.willBeRetried - ) + text += getAttemptText(parsed.testCase.attempt, false) text += ` # ${colorFns.location( formatLocation(parsed.testCase.sourceLocation) )}\n` diff --git a/src/formatter/json_formatter.ts b/src/formatter/json_formatter.ts index ff3c82ace..6f0315357 100644 --- a/src/formatter/json_formatter.ts +++ b/src/formatter/json_formatter.ts @@ -132,13 +132,13 @@ export default class JsonFormatter extends Formatter { this.eventDataCollector .getTestCaseAttempts() .forEach((testCaseAttempt: ITestCaseAttempt) => { - if (!testCaseAttempt.worstTestStepResult.willBeRetried) { - const uri = testCaseAttempt.pickle.uri - if (doesNotHaveValue(groupedTestCaseAttempts[uri])) { - groupedTestCaseAttempts[uri] = [] - } - groupedTestCaseAttempts[uri].push(testCaseAttempt) + // if (!testCaseAttempt.worstTestStepResult.willBeRetried) { + const uri = testCaseAttempt.pickle.uri + if (doesNotHaveValue(groupedTestCaseAttempts[uri])) { + groupedTestCaseAttempts[uri] = [] } + groupedTestCaseAttempts[uri].push(testCaseAttempt) + // } }) const features = Object.keys(groupedTestCaseAttempts).map((uri) => { const group = groupedTestCaseAttempts[uri] diff --git a/src/formatter/progress_bar_formatter.ts b/src/formatter/progress_bar_formatter.ts index 2456ec93c..ed6fc812d 100644 --- a/src/formatter/progress_bar_formatter.ts +++ b/src/formatter/progress_bar_formatter.ts @@ -80,7 +80,7 @@ export default class ProgressBarFormatter extends Formatter { testCaseAttempt, }) ) - if (worstTestStepResult.willBeRetried) { + if (testCaseFinished.willBeRetried) { const stepsToRetry = testCaseAttempt.pickle.steps.length this.progressBar.tick(-stepsToRetry) } diff --git a/src/runtime/parallel/coordinator.ts b/src/runtime/parallel/coordinator.ts index 7c5b518c1..d78cd08c4 100644 --- a/src/runtime/parallel/coordinator.ts +++ b/src/runtime/parallel/coordinator.ts @@ -162,7 +162,7 @@ export default class Coordinator { testCaseFinished.testCaseStartedId ) if ( - !worstTestStepResult.willBeRetried && + !testCaseFinished.willBeRetried && this.shouldCauseFailure(worstTestStepResult.status) ) { this.success = false diff --git a/src/runtime/step_runner.ts b/src/runtime/step_runner.ts index e00a0f20b..14e765bfd 100644 --- a/src/runtime/step_runner.ts +++ b/src/runtime/step_runner.ts @@ -78,7 +78,6 @@ export async function run({ duration, status, message, - willBeRetried: false, } } diff --git a/src/runtime/test_case_runner.ts b/src/runtime/test_case_runner.ts index e5a910a24..73177c7a7 100644 --- a/src/runtime/test_case_runner.ts +++ b/src/runtime/test_case_runner.ts @@ -116,7 +116,6 @@ export default class TestCaseRunner { status: this.skip ? messages.TestStepResultStatus.SKIPPED : messages.TestStepResultStatus.PASSED, - willBeRetried: false, duration: messages.TimeConversion.millisecondsToDuration(0), } } @@ -172,7 +171,7 @@ export default class TestCaseRunner { TODO dont rely on `testStepResult.willBeRetried`, it will be moved or removed see https://github.com/cucumber/cucumber/issues/902 */ - testStepResult.willBeRetried = true + // testStepResult.willBeRetried = true } const testStepFinished: messages.Envelope = { testStepFinished: { @@ -229,12 +228,13 @@ export default class TestCaseRunner { testCaseFinished: { testCaseStartedId: this.currentTestCaseStartedId, timestamp: this.stopwatch.timestamp(), + willBeRetried: false, // TODO implement properly }, } this.eventBroadcaster.emit('envelope', testCaseFinished) - if (!this.getWorstStepResult().willBeRetried) { - break - } + // if (!this.getWorstStepResult().willBeRetried) { + // break + // } this.resetTestProgressData() } return this.getWorstStepResult().status @@ -249,7 +249,6 @@ export default class TestCaseRunner { return { status: messages.TestStepResultStatus.SKIPPED, duration: messages.TimeConversion.millisecondsToDuration(0), - willBeRetried: false, } } return await this.invokeStep(null, hookDefinition, hookParameter) @@ -288,20 +287,17 @@ export default class TestCaseRunner { return { status: messages.TestStepResultStatus.UNDEFINED, duration: messages.TimeConversion.millisecondsToDuration(0), - willBeRetried: false, } } else if (stepDefinitions.length > 1) { return { message: getAmbiguousStepException(stepDefinitions), status: messages.TestStepResultStatus.AMBIGUOUS, duration: messages.TimeConversion.millisecondsToDuration(0), - willBeRetried: false, } } else if (this.isSkippingSteps()) { return { status: messages.TestStepResultStatus.SKIPPED, duration: messages.TimeConversion.millisecondsToDuration(0), - willBeRetried: false, } } From b92d422bbae626dffbf9abb4704d659311334eeb Mon Sep 17 00:00:00 2001 From: David Goss Date: Sat, 21 Aug 2021 12:38:25 +0100 Subject: [PATCH 03/12] fix test case runner --- src/runtime/test_case_runner.ts | 26 +++++++++----------------- src/runtime/test_case_runner_spec.ts | 12 ++++-------- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/src/runtime/test_case_runner.ts b/src/runtime/test_case_runner.ts index 73177c7a7..308e04c22 100644 --- a/src/runtime/test_case_runner.ts +++ b/src/runtime/test_case_runner.ts @@ -1,8 +1,8 @@ import { getAmbiguousStepException } from './helpers' import AttachmentManager from './attachment_manager' import StepRunner from './step_runner' -import { IdGenerator, getWorstTestStepResult } from '@cucumber/messages' import * as messages from '@cucumber/messages' +import { getWorstTestStepResult, IdGenerator } from '@cucumber/messages' import { EventEmitter } from 'events' import { ISupportCodeLibrary, @@ -148,7 +148,6 @@ export default class TestCaseRunner { async aroundTestStep( testStepId: string, - attempt: number, runStepFn: () => Promise ): Promise { const testStepStarted: messages.Envelope = { @@ -163,16 +162,6 @@ export default class TestCaseRunner { const testStepResult = await runStepFn() this.currentTestStepId = null this.testStepResults.push(testStepResult) - if ( - testStepResult.status === messages.TestStepResultStatus.FAILED && - attempt + 1 < this.maxAttempts - ) { - /* - TODO dont rely on `testStepResult.willBeRetried`, it will be moved or removed - see https://github.com/cucumber/cucumber/issues/902 - */ - // testStepResult.willBeRetried = true - } const testStepFinished: messages.Envelope = { testStepFinished: { testCaseStartedId: this.currentTestCaseStartedId, @@ -199,7 +188,7 @@ export default class TestCaseRunner { // used to determine whether a hook is a Before or After let didWeRunStepsYet = false for (const testStep of this.testCase.testSteps) { - await this.aroundTestStep(testStep.id, attempt, async () => { + await this.aroundTestStep(testStep.id, async () => { if (doesHaveValue(testStep.hookId)) { const hookParameter: ITestCaseHookParameter = { gherkinDocument: this.gherkinDocument, @@ -224,17 +213,20 @@ export default class TestCaseRunner { } }) } + const willBeRetried = + this.getWorstStepResult().status === + messages.TestStepResultStatus.FAILED && attempt + 1 < this.maxAttempts const testCaseFinished: messages.Envelope = { testCaseFinished: { testCaseStartedId: this.currentTestCaseStartedId, timestamp: this.stopwatch.timestamp(), - willBeRetried: false, // TODO implement properly + willBeRetried, }, } this.eventBroadcaster.emit('envelope', testCaseFinished) - // if (!this.getWorstStepResult().willBeRetried) { - // break - // } + if (!willBeRetried) { + break + } this.resetTestProgressData() } return this.getWorstStepResult().status diff --git a/src/runtime/test_case_runner_spec.ts b/src/runtime/test_case_runner_spec.ts index 9e69b25f8..76ad1c77b 100644 --- a/src/runtime/test_case_runner_spec.ts +++ b/src/runtime/test_case_runner_spec.ts @@ -99,7 +99,6 @@ describe('TestCaseRunner', () => { duration: messages.TimeConversion.millisecondsToDuration(1), status: messages.TestStepResultStatus.PASSED, message: undefined, - willBeRetried: false, } // Act @@ -110,7 +109,7 @@ describe('TestCaseRunner', () => { }) // Assert - const expectedtEnvelopes = [ + const expectedtEnvelopes: messages.Envelope[] = [ { testCaseStarted: { attempt: 0, @@ -138,6 +137,7 @@ describe('TestCaseRunner', () => { testCaseFinished: { testCaseStartedId: '2', timestamp: predictableTimestamp(3), + willBeRetried: false, }, }, ] @@ -165,7 +165,6 @@ describe('TestCaseRunner', () => { duration: messages.TimeConversion.millisecondsToDuration(0), status: messages.TestStepResultStatus.FAILED, message: 'fail', - willBeRetried: false, } // Act @@ -216,7 +215,6 @@ describe('TestCaseRunner', () => { message, status: messages.TestStepResultStatus.AMBIGUOUS, duration: messages.TimeConversion.millisecondsToDuration(0), - willBeRetried: false, } expect(envelopes[2].testStepFinished.testStepResult).to.eql(expected) expect(result).to.eql( @@ -249,7 +247,6 @@ describe('TestCaseRunner', () => { const expected: messages.TestStepResult = { status: messages.TestStepResultStatus.UNDEFINED, duration: messages.TimeConversion.millisecondsToDuration(0), - willBeRetried: false, } expect(envelopes[2].testStepFinished.testStepResult).to.eql(expected) expect(result).to.eql( @@ -311,7 +308,6 @@ describe('TestCaseRunner', () => { duration: messages.TimeConversion.millisecondsToDuration(0), message: 'error', status: messages.TestStepResultStatus.FAILED, - willBeRetried: true, }, testStepId: '1', timestamp: predictableTimestamp(2), @@ -321,6 +317,7 @@ describe('TestCaseRunner', () => { testCaseFinished: { testCaseStartedId: '2', timestamp: predictableTimestamp(3), + willBeRetried: true, }, }, { @@ -345,7 +342,6 @@ describe('TestCaseRunner', () => { duration: messages.TimeConversion.millisecondsToDuration(0), message: undefined, status: messages.TestStepResultStatus.PASSED, - willBeRetried: false, }, testStepId: '1', timestamp: predictableTimestamp(6), @@ -355,6 +351,7 @@ describe('TestCaseRunner', () => { testCaseFinished: { testCaseStartedId: '3', timestamp: predictableTimestamp(7), + willBeRetried: false, }, }, ] @@ -392,7 +389,6 @@ describe('TestCaseRunner', () => { const expected: messages.TestStepResult = { status: messages.TestStepResultStatus.SKIPPED, duration: messages.TimeConversion.millisecondsToDuration(0), - willBeRetried: false, } expect(envelopes[2].testStepFinished.testStepResult).to.eql(expected) expect(result).to.eql( From ab938aed0fdb03167ae6e47ee80375165f5896ce Mon Sep 17 00:00:00 2001 From: David Goss Date: Sat, 21 Aug 2021 13:02:23 +0100 Subject: [PATCH 04/12] fix summary helper --- src/formatter/helpers/event_data_collector.ts | 7 +++- src/formatter/helpers/summary_helpers.ts | 32 ++++++++++--------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/formatter/helpers/event_data_collector.ts b/src/formatter/helpers/event_data_collector.ts index d30e006a2..4c88d9154 100644 --- a/src/formatter/helpers/event_data_collector.ts +++ b/src/formatter/helpers/event_data_collector.ts @@ -4,6 +4,7 @@ import { EventEmitter } from 'events' interface ITestCaseAttemptData { attempt: number + willBeRetried: boolean testCaseId: string stepAttachments: Record stepResults: Record @@ -12,6 +13,7 @@ interface ITestCaseAttemptData { export interface ITestCaseAttempt { attempt: number + willBeRetried: boolean gherkinDocument: messages.GherkinDocument pickle: messages.Pickle stepAttachments: Record @@ -54,6 +56,7 @@ export default class EventDataCollector { pickle, testCase, attempt: testCaseAttemptData.attempt, + willBeRetried: testCaseAttemptData.willBeRetried, stepAttachments: testCaseAttemptData.stepAttachments, stepResults: testCaseAttemptData.stepResults, worstTestStepResult: testCaseAttemptData.worstTestStepResult, @@ -84,6 +87,7 @@ export default class EventDataCollector { private initTestCaseAttempt(testCaseStarted: messages.TestCaseStarted): void { this.testCaseAttemptDataMap[testCaseStarted.id] = { attempt: testCaseStarted.attempt, + willBeRetried: false, testCaseId: testCaseStarted.testCaseId, stepAttachments: {}, stepResults: {}, @@ -115,11 +119,12 @@ export default class EventDataCollector { testStepResult } - storeTestCaseResult({ testCaseStartedId }: messages.TestCaseFinished): void { + storeTestCaseResult({ testCaseStartedId, willBeRetried }: messages.TestCaseFinished): void { const stepResults = Object.values( this.testCaseAttemptDataMap[testCaseStartedId].stepResults ) this.testCaseAttemptDataMap[testCaseStartedId].worstTestStepResult = messages.getWorstTestStepResult(stepResults) + this.testCaseAttemptDataMap[testCaseStartedId].willBeRetried = willBeRetried } } diff --git a/src/formatter/helpers/summary_helpers.ts b/src/formatter/helpers/summary_helpers.ts index 5f82103a2..e18bfb9d9 100644 --- a/src/formatter/helpers/summary_helpers.ts +++ b/src/formatter/helpers/summary_helpers.ts @@ -27,22 +27,24 @@ export function formatSummary({ const testCaseResults: messages.TestStepResult[] = [] const testStepResults: messages.TestStepResult[] = [] let totalStepDuration = messages.TimeConversion.millisecondsToDuration(0) - testCaseAttempts.forEach(({ testCase, worstTestStepResult, stepResults }) => { - Object.values(stepResults).forEach((stepResult) => { - totalStepDuration = messages.TimeConversion.addDurations( - totalStepDuration, - stepResult.duration - ) - }) - // if (!worstTestStepResult.willBeRetried) { - testCaseResults.push(worstTestStepResult) - testCase.testSteps.forEach((testStep) => { - if (doesHaveValue(testStep.pickleStepId)) { - testStepResults.push(stepResults[testStep.id]) + testCaseAttempts.forEach( + ({ testCase, willBeRetried, worstTestStepResult, stepResults }) => { + Object.values(stepResults).forEach((stepResult) => { + totalStepDuration = messages.TimeConversion.addDurations( + totalStepDuration, + stepResult.duration + ) + }) + if (!willBeRetried) { + testCaseResults.push(worstTestStepResult) + testCase.testSteps.forEach((testStep) => { + if (doesHaveValue(testStep.pickleStepId)) { + testStepResults.push(stepResults[testStep.id]) + } + }) } - }) - // } - }) + } + ) const scenarioSummary = getCountSummary({ colorFns, objects: testCaseResults, From c92a321fd6769e6cf44981c268c5990046831eb2 Mon Sep 17 00:00:00 2001 From: David Goss Date: Sat, 21 Aug 2021 13:12:05 +0100 Subject: [PATCH 05/12] fix formatters (ish) --- src/formatter/helpers/issue_helpers.ts | 16 ++++++++++++---- src/formatter/json_formatter.ts | 12 ++++++------ src/formatter/summary_formatter.ts | 14 ++++++++++++-- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/formatter/helpers/issue_helpers.ts b/src/formatter/helpers/issue_helpers.ts index 5b038e0ba..02fa6f419 100644 --- a/src/formatter/helpers/issue_helpers.ts +++ b/src/formatter/helpers/issue_helpers.ts @@ -6,16 +6,24 @@ import StepDefinitionSnippetBuilder from '../step_definition_snippet_builder' import { ISupportCodeLibrary } from '../../support_code_library_builder/types' import { ITestCaseAttempt } from './event_data_collector' -export function isFailure(result: messages.TestStepResult): boolean { +export function isFailure( + result: messages.TestStepResult, + willBeRetried: boolean = false +): boolean { return ( result.status === 'AMBIGUOUS' || result.status === 'UNDEFINED' || - result.status === 'FAILED' + (result.status === 'FAILED' && !willBeRetried) ) } -export function isWarning(result: messages.TestStepResult): boolean { - return result.status === 'PENDING' +export function isWarning( + result: messages.TestStepResult, + willBeRetried: boolean = false +): boolean { + return ( + result.status === 'PENDING' || (result.status === 'FAILED' && willBeRetried) + ) } export function isIssue(result: messages.TestStepResult): boolean { diff --git a/src/formatter/json_formatter.ts b/src/formatter/json_formatter.ts index 6f0315357..2b2c21c33 100644 --- a/src/formatter/json_formatter.ts +++ b/src/formatter/json_formatter.ts @@ -132,13 +132,13 @@ export default class JsonFormatter extends Formatter { this.eventDataCollector .getTestCaseAttempts() .forEach((testCaseAttempt: ITestCaseAttempt) => { - // if (!testCaseAttempt.worstTestStepResult.willBeRetried) { - const uri = testCaseAttempt.pickle.uri - if (doesNotHaveValue(groupedTestCaseAttempts[uri])) { - groupedTestCaseAttempts[uri] = [] + if (!testCaseAttempt.willBeRetried) { + const uri = testCaseAttempt.pickle.uri + if (doesNotHaveValue(groupedTestCaseAttempts[uri])) { + groupedTestCaseAttempts[uri] = [] + } + groupedTestCaseAttempts[uri].push(testCaseAttempt) } - groupedTestCaseAttempts[uri].push(testCaseAttempt) - // } }) const features = Object.keys(groupedTestCaseAttempts).map((uri) => { const group = groupedTestCaseAttempts[uri] diff --git a/src/formatter/summary_formatter.ts b/src/formatter/summary_formatter.ts index d66c32aad..e49e342a7 100644 --- a/src/formatter/summary_formatter.ts +++ b/src/formatter/summary_formatter.ts @@ -36,9 +36,19 @@ export default class SummaryFormatter extends Formatter { const warnings: ITestCaseAttempt[] = [] const testCaseAttempts = this.eventDataCollector.getTestCaseAttempts() testCaseAttempts.forEach((testCaseAttempt) => { - if (isFailure(testCaseAttempt.worstTestStepResult)) { + if ( + isFailure( + testCaseAttempt.worstTestStepResult, + testCaseAttempt.willBeRetried + ) + ) { failures.push(testCaseAttempt) - } else if (isWarning(testCaseAttempt.worstTestStepResult)) { + } else if ( + isWarning( + testCaseAttempt.worstTestStepResult, + testCaseAttempt.willBeRetried + ) + ) { warnings.push(testCaseAttempt) } }) From f5c4dfd16ac02a65069c2a9d2236c97e168f161c Mon Sep 17 00:00:00 2001 From: David Goss Date: Sat, 21 Aug 2021 13:16:33 +0100 Subject: [PATCH 06/12] fix last bit in formatters --- src/formatter/helpers/test_case_attempt_formatter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/formatter/helpers/test_case_attempt_formatter.ts b/src/formatter/helpers/test_case_attempt_formatter.ts index ca81fd042..3c67c3cb0 100644 --- a/src/formatter/helpers/test_case_attempt_formatter.ts +++ b/src/formatter/helpers/test_case_attempt_formatter.ts @@ -92,7 +92,7 @@ export function formatTestCaseAttempt({ supportCodeLibrary, }) let text = `Scenario: ${parsed.testCase.name}` - text += getAttemptText(parsed.testCase.attempt, false) + text += getAttemptText(parsed.testCase.attempt, testCaseAttempt.willBeRetried) text += ` # ${colorFns.location( formatLocation(parsed.testCase.sourceLocation) )}\n` From e498ea79fb3ab54051383b3bd79acf742e900b55 Mon Sep 17 00:00:00 2001 From: David Goss Date: Sat, 21 Aug 2021 13:34:01 +0100 Subject: [PATCH 07/12] update fixtures for feature tests --- features/fixtures/formatters/failed.message.json.ts | 2 +- features/fixtures/formatters/passed-rule.message.json.ts | 2 +- features/fixtures/formatters/passed-scenario.message.json.ts | 2 +- features/fixtures/formatters/retried.message.json.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/features/fixtures/formatters/failed.message.json.ts b/features/fixtures/formatters/failed.message.json.ts index b9438c3f1..11cef7318 100644 --- a/features/fixtures/formatters/failed.message.json.ts +++ b/features/fixtures/formatters/failed.message.json.ts @@ -139,7 +139,6 @@ module.exports = [ nanos: 0, }, status: 'FAILED', - willBeRetried: false, message: 'Error: my error', }, timestamp: { @@ -155,6 +154,7 @@ module.exports = [ seconds: 0, nanos: 4000000, }, + willBeRetried: false, }, }, { diff --git a/features/fixtures/formatters/passed-rule.message.json.ts b/features/fixtures/formatters/passed-rule.message.json.ts index 784f4eba1..98210b60b 100644 --- a/features/fixtures/formatters/passed-rule.message.json.ts +++ b/features/fixtures/formatters/passed-rule.message.json.ts @@ -154,7 +154,6 @@ module.exports = [ nanos: 0, }, status: 'PASSED', - willBeRetried: false, }, timestamp: { seconds: 0, @@ -169,6 +168,7 @@ module.exports = [ seconds: 0, nanos: 4000000, }, + willBeRetried: false, }, }, { diff --git a/features/fixtures/formatters/passed-scenario.message.json.ts b/features/fixtures/formatters/passed-scenario.message.json.ts index 99a403fd7..856dc5f32 100644 --- a/features/fixtures/formatters/passed-scenario.message.json.ts +++ b/features/fixtures/formatters/passed-scenario.message.json.ts @@ -139,7 +139,6 @@ module.exports = [ nanos: 0, }, status: 'PASSED', - willBeRetried: false, }, timestamp: { seconds: 0, @@ -154,6 +153,7 @@ module.exports = [ seconds: 0, nanos: 4000000, }, + willBeRetried: false, }, }, { diff --git a/features/fixtures/formatters/retried.message.json.ts b/features/fixtures/formatters/retried.message.json.ts index 1d82e730c..cc8615094 100644 --- a/features/fixtures/formatters/retried.message.json.ts +++ b/features/fixtures/formatters/retried.message.json.ts @@ -139,7 +139,6 @@ module.exports = [ nanos: 0, }, status: 'FAILED', - willBeRetried: true, message: 'Error: my error', }, timestamp: { @@ -155,6 +154,7 @@ module.exports = [ seconds: 0, nanos: 4000000, }, + willBeRetried: true, }, }, { @@ -188,7 +188,6 @@ module.exports = [ nanos: 0, }, status: 'PASSED', - willBeRetried: false, }, timestamp: { seconds: 0, @@ -203,6 +202,7 @@ module.exports = [ seconds: 0, nanos: 8000000, }, + willBeRetried: false, }, }, { From e5a64846f06236c093d73d1c2a3934577cb52b42 Mon Sep 17 00:00:00 2001 From: David Goss Date: Sat, 21 Aug 2021 13:46:10 +0100 Subject: [PATCH 08/12] fix attachments cck --- .../features/attachments/attachments.ts | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/compatibility/features/attachments/attachments.ts b/compatibility/features/attachments/attachments.ts index e84bb71a8..4d130baa4 100644 --- a/compatibility/features/attachments/attachments.ts +++ b/compatibility/features/attachments/attachments.ts @@ -63,9 +63,26 @@ When('a JPEG image is attached', async function (this: World) { 'compatibility-kit', 'features', 'attachments', - 'cucumber-growing-on-vine.jpg' + 'cucumber.png' ) ), - 'image/jpg' + 'image/png' + ) +}) + +When('the {word} png is attached', async function (filename) { + await this.attach( + fs.createReadStream( + path.join( + process.cwd(), + 'node_modules', + '@cucumber', + 'compatibility-kit', + 'features', + 'attachments', + filename + ) + ), + 'image/png' ) }) From 38c5621988c481e66f2e7eccda2b52a0c8c66b58 Mon Sep 17 00:00:00 2001 From: David Goss Date: Sat, 21 Aug 2021 13:52:21 +0100 Subject: [PATCH 09/12] hook up retry cck --- compatibility/cck_spec.ts | 14 +++++++++----- compatibility/features/retry/retry.ts | 25 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 compatibility/features/retry/retry.ts diff --git a/compatibility/cck_spec.ts b/compatibility/cck_spec.ts index 42133765d..95ad589d0 100644 --- a/compatibility/cck_spec.ts +++ b/compatibility/cck_spec.ts @@ -26,16 +26,20 @@ describe('Cucumber Compatibility Kit', () => { const suiteName = match[1] const extension = match[2] it(`passes the cck suite for '${suiteName}'`, async () => { - const args = [ - 'node', - path.join(PROJECT_PATH, 'bin', 'cucumber-js'), - ].concat([ + const cliOptions = [ `${CCK_FEATURES_PATH}/${suiteName}/${suiteName}${extension}`, '--require', `${CCK_IMPLEMENTATIONS_PATH}/${suiteName}/${suiteName}.ts`, '--profile', 'cck', - ]) + ] + if (suiteName === 'retry') { + cliOptions.push('--retry', '2') + } + const args = [ + 'node', + path.join(PROJECT_PATH, 'bin', 'cucumber-js'), + ].concat(cliOptions) const stdout = new PassThrough() try { await new Cli({ diff --git a/compatibility/features/retry/retry.ts b/compatibility/features/retry/retry.ts new file mode 100644 index 000000000..888982124 --- /dev/null +++ b/compatibility/features/retry/retry.ts @@ -0,0 +1,25 @@ +import { Given } from '../../../src' + +Given('a step that always passes', function () { + // no-op +}) + +let secondTimePass = 0 +Given('a step that passes the second time', function () { + secondTimePass++ + if (secondTimePass < 2) { + throw new Error('Exception in step') + } +}) + +let thirdTimePass = 0 +Given('a step that passes the third time', function () { + thirdTimePass++ + if (thirdTimePass < 3) { + throw new Error('Exception in step') + } +}) + +Given('a step that always fails', function () { + throw new Error('Exception in step') +}) From a85415c346e1a3fc588f4966d61fa80f7e55b0f1 Mon Sep 17 00:00:00 2001 From: David Goss Date: Sat, 21 Aug 2021 13:53:01 +0100 Subject: [PATCH 10/12] lint --- src/formatter/helpers/event_data_collector.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/formatter/helpers/event_data_collector.ts b/src/formatter/helpers/event_data_collector.ts index 4c88d9154..d976d1417 100644 --- a/src/formatter/helpers/event_data_collector.ts +++ b/src/formatter/helpers/event_data_collector.ts @@ -119,7 +119,10 @@ export default class EventDataCollector { testStepResult } - storeTestCaseResult({ testCaseStartedId, willBeRetried }: messages.TestCaseFinished): void { + storeTestCaseResult({ + testCaseStartedId, + willBeRetried, + }: messages.TestCaseFinished): void { const stepResults = Object.values( this.testCaseAttemptDataMap[testCaseStartedId].stepResults ) From 636bc059852651eea6bfcd672360db50911a1f23 Mon Sep 17 00:00:00 2001 From: David Goss Date: Sat, 21 Aug 2021 13:57:43 +0100 Subject: [PATCH 11/12] update doc --- docs/migration.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/migration.md b/docs/migration.md index 36ee13f82..726cbb01d 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -61,8 +61,7 @@ Now in `@cucumber/cucumber`: "duration": { "seconds": "0", "nanos": 660000000 - }, - "willBeRetried": true + } } } ``` From 47b36815e1ab24e8a509909cc1bb6b9eeaa9fc32 Mon Sep 17 00:00:00 2001 From: David Goss Date: Sun, 22 Aug 2021 11:29:46 +0100 Subject: [PATCH 12/12] update lockfile --- package-lock.json | 222 ++++++++++++++++++++-------------------------- 1 file changed, 96 insertions(+), 126 deletions(-) diff --git a/package-lock.json b/package-lock.json index bacb22f40..a8343e4e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,13 +9,13 @@ "version": "7.3.0", "license": "MIT", "dependencies": { - "@cucumber/create-meta": "^5.0.0", - "@cucumber/cucumber-expressions": "^12.1.1", - "@cucumber/gherkin": "^19.0.3", - "@cucumber/gherkin-streams": "^2.0.2", - "@cucumber/html-formatter": "^15.0.2", - "@cucumber/messages": "^16.0.1", - "@cucumber/tag-expressions": "^3.0.1", + "@cucumber/create-meta": "6.0.1", + "@cucumber/cucumber-expressions": "12.1.2", + "@cucumber/gherkin": "20.0.1", + "@cucumber/gherkin-streams": "3.0.0", + "@cucumber/html-formatter": "16.0.1", + "@cucumber/messages": "17.0.1", + "@cucumber/tag-expressions": "3.0.1", "assertion-error-formatter": "^3.0.0", "capital-case": "^1.0.4", "cli-table3": "^0.6.0", @@ -43,9 +43,9 @@ "cucumber-js": "bin/cucumber-js" }, "devDependencies": { - "@cucumber/compatibility-kit": "7.0.0", - "@cucumber/message-streams": "2.1.0", - "@cucumber/query": "10.1.0", + "@cucumber/compatibility-kit": "7.1.0", + "@cucumber/message-streams": "3.0.0", + "@cucumber/query": "11.0.0", "@sinonjs/fake-timers": "7.1.2", "@types/chai": "4.2.21", "@types/dirty-chai": "2.0.2", @@ -512,106 +512,90 @@ } }, "node_modules/@cucumber/compatibility-kit": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@cucumber/compatibility-kit/-/compatibility-kit-7.0.0.tgz", - "integrity": "sha512-RmRaednTus8Pl1rjOqdNeXp2TUWCfkQhvP0Eq9DW5gwubnFgJlKd9kHyY+VO8/te+Vv8a9YAyXeZ0SJy7QnRLA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@cucumber/compatibility-kit/-/compatibility-kit-7.1.0.tgz", + "integrity": "sha512-9XK8Fbbkg6Dpbvb96KpRozGtMXbfy266jV+bh95/X697eXDoOlTe5OBcZjzpti3l40Ksu2NpF0fE0YvXMPixVw==", "dev": true }, "node_modules/@cucumber/create-meta": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@cucumber/create-meta/-/create-meta-5.0.0.tgz", - "integrity": "sha512-Z5kMZkUff00S3/KSnKzB/KOm2UIxMXY1xXmj2dQMlD49lV6v/W8EEvgDMNtQotQNSOQU5bDupmWQpk+o16tXIw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@cucumber/create-meta/-/create-meta-6.0.1.tgz", + "integrity": "sha512-oaNFVBAfduO0GJ1xUtgfGZHvg6+CH56DYaGWPAraayLxvtsQwaOnBYMzzaccGHty/Q6sksQ+IIZK3SuGkTmdvg==", "dependencies": { - "@cucumber/messages": "^16.0.0" + "@cucumber/messages": "^17.0.1" } }, "node_modules/@cucumber/cucumber-expressions": { - "version": "12.1.1", - "resolved": "https://registry.npmjs.org/@cucumber/cucumber-expressions/-/cucumber-expressions-12.1.1.tgz", - "integrity": "sha512-WKkQAW5A8mReAFbl6FwkSiTNsy478JAOrHROrzUqNDW7Q/FU3yvrvgueX7G0NHAkvMYUMLYTSaxqLFQIMJ+K3Q==", + "version": "12.1.2", + "resolved": "https://registry.npmjs.org/@cucumber/cucumber-expressions/-/cucumber-expressions-12.1.2.tgz", + "integrity": "sha512-3iSezyIpuc5NlEphh5gNiqGx4p9l+3n9qnhMbKP7ouJ1BjbTa7w+f8f5g13+n+i6TkJ08l+CtUrFXanoBbsxIQ==", "dependencies": { - "becke-ch--regex--s0-0-v1--base--pl--lib": "^1.4.0" + "becke-ch--regex--s0-0-v1--base--pl--lib": "1.4.0" } }, "node_modules/@cucumber/gherkin": { - "version": "19.0.3", - "resolved": "https://registry.npmjs.org/@cucumber/gherkin/-/gherkin-19.0.3.tgz", - "integrity": "sha512-gWdMm8mfRk3P+VugJWvNALaQV5QnT+5RkqWy3tO+4NsMSQZPo5p4V4vXwriQZ/sZR1Wni5TDRztuRsKLgZ3XHA==", + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@cucumber/gherkin/-/gherkin-20.0.1.tgz", + "integrity": "sha512-1vXZETZYF3A9egC+N1EIeMobLQQ6VcQoGQ0NvHhkZ/NYXjJB+rPwMbZmhnDfqexhzJbWlA2CVNKc+VHrUobyyg==", "dependencies": { - "@cucumber/message-streams": "^2.0.0", - "@cucumber/messages": "^16.0.1" + "@cucumber/message-streams": "^3.0.0", + "@cucumber/messages": "^17.0.1" } }, "node_modules/@cucumber/gherkin-streams": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@cucumber/gherkin-streams/-/gherkin-streams-2.0.2.tgz", - "integrity": "sha512-cKmXOBz4OwGlrHMBCc4qCC3KzLaqcEZ11nWWskIbv6jyfvlIRuM2OgEF6VLcNVewczifW1p6DrDj0OO+BeXocA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@cucumber/gherkin-streams/-/gherkin-streams-3.0.0.tgz", + "integrity": "sha512-vdTfSJx4z3Ju2vtresEM930chq3DVxnuQ1FFCI69m2Q83sa2mL8VEFvJ5fwlF7fY/fqLwop04W6B7lCkSZq7fg==", "dependencies": { - "@cucumber/gherkin": "^19.0.1", - "@cucumber/message-streams": "^2.0.0", - "@cucumber/messages": "^16.0.0", - "commander": "7.2.0", + "@cucumber/gherkin": "^20.0.0", + "@cucumber/message-streams": "^3.0.0", + "@cucumber/messages": "^17.0.0", + "commander": "8.0.0", "source-map-support": "0.5.19" }, "bin": { "gherkin-javascript": "bin/gherkin" } }, - "node_modules/@cucumber/gherkin-streams/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "engines": { - "node": ">= 10" - } - }, "node_modules/@cucumber/html-formatter": { - "version": "15.0.2", - "resolved": "https://registry.npmjs.org/@cucumber/html-formatter/-/html-formatter-15.0.2.tgz", - "integrity": "sha512-j+YGY4ytj78G/v1gZo53D+vuKXlTg/oxNwSCCGvRQo75+AqYDJSkm/vexXJQ5lY1rXAvlbZ9KI6jhg6LDs0YdQ==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@cucumber/html-formatter/-/html-formatter-16.0.1.tgz", + "integrity": "sha512-a/FPKreNILJWwjc/jXikqyLQRyGD6qY9XMSn5NdtJCXflzmPg3ihe9LMrR6DQTS1tr32kjuvsBdkv5lU80Xz6A==", "dependencies": { - "@cucumber/messages": "^16.0.1", - "commander": "7.2.0", + "@cucumber/messages": "^17.0.1", + "commander": "8.0.0", "source-map-support": "0.5.19" }, "bin": { "cucumber-html-formatter": "bin/cucumber-html-formatter.js" } }, - "node_modules/@cucumber/html-formatter/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "engines": { - "node": ">= 10" - } - }, "node_modules/@cucumber/message-streams": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@cucumber/message-streams/-/message-streams-2.1.0.tgz", - "integrity": "sha512-Yh3mw3qv6QL9NI/ihkZF8V9MX2GbnR6oktv34kC3uAbrQy9d/b2SZ3HNjG3J9JQqpV4B7Om3SPElJYIeo66TrA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@cucumber/message-streams/-/message-streams-3.0.0.tgz", + "integrity": "sha512-ABx91nKUebV8mLmpf7BsB3bmQ57CDAfj2EIZswThz+nJHYPAFlZ1JewI6ykFsR9RzJ7/QhgQs0KHeQh7nH/u1Q==", "dependencies": { - "@cucumber/messages": "^16.0.1" + "@cucumber/messages": "^17.0.0" } }, "node_modules/@cucumber/messages": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-16.0.1.tgz", - "integrity": "sha512-80JcaAfQragFqR1rMhRwiqWL9HcR6Z4LDD2mfF0Lxg/lFkCNvmWa9Jl10NUNfFXYD555NKPzP/8xFo55abw8TQ==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-17.0.1.tgz", + "integrity": "sha512-cr07vBdiUnGgG3p2bUYhKswTwmk6yY62Fu/+Azvnd/eHar266+SkEs1UyO342ZXK56IyBtEE7T0X3Zn3V74q8A==", "dependencies": { - "@types/uuid": "8.3.0", + "@types/uuid": "8.3.1", "class-transformer": "0.4.0", "reflect-metadata": "0.1.13", "uuid": "8.3.2" } }, "node_modules/@cucumber/query": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@cucumber/query/-/query-10.1.0.tgz", - "integrity": "sha512-6LzfJA62hqi8Nf3XGZjtLa1J8G5HrYNUMxWRcXxiGiOIq2erIaiWu8628NMmeIYLyf93LgiKHGcjNFTu7ZrTPA==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@cucumber/query/-/query-11.0.0.tgz", + "integrity": "sha512-GkjZX7p8h4OiajDrBXs/4E7qKhnW5gsqVXvJRI1Vv7bREpXc1W0Gc9S4UDgtx/YQ6djs0yBrjIbSHJRtEHYnIA==", "dev": true, "dependencies": { - "@cucumber/messages": "^16.0.1", + "@cucumber/messages": "^17.0.0", "@teppeis/multimaps": "2.0.0" } }, @@ -1095,9 +1079,9 @@ "dev": true }, "node_modules/@types/uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg==" }, "node_modules/@types/verror": { "version": "1.10.5", @@ -7591,98 +7575,84 @@ } }, "@cucumber/compatibility-kit": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@cucumber/compatibility-kit/-/compatibility-kit-7.0.0.tgz", - "integrity": "sha512-RmRaednTus8Pl1rjOqdNeXp2TUWCfkQhvP0Eq9DW5gwubnFgJlKd9kHyY+VO8/te+Vv8a9YAyXeZ0SJy7QnRLA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@cucumber/compatibility-kit/-/compatibility-kit-7.1.0.tgz", + "integrity": "sha512-9XK8Fbbkg6Dpbvb96KpRozGtMXbfy266jV+bh95/X697eXDoOlTe5OBcZjzpti3l40Ksu2NpF0fE0YvXMPixVw==", "dev": true }, "@cucumber/create-meta": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@cucumber/create-meta/-/create-meta-5.0.0.tgz", - "integrity": "sha512-Z5kMZkUff00S3/KSnKzB/KOm2UIxMXY1xXmj2dQMlD49lV6v/W8EEvgDMNtQotQNSOQU5bDupmWQpk+o16tXIw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@cucumber/create-meta/-/create-meta-6.0.1.tgz", + "integrity": "sha512-oaNFVBAfduO0GJ1xUtgfGZHvg6+CH56DYaGWPAraayLxvtsQwaOnBYMzzaccGHty/Q6sksQ+IIZK3SuGkTmdvg==", "requires": { - "@cucumber/messages": "^16.0.0" + "@cucumber/messages": "^17.0.1" } }, "@cucumber/cucumber-expressions": { - "version": "12.1.1", - "resolved": "https://registry.npmjs.org/@cucumber/cucumber-expressions/-/cucumber-expressions-12.1.1.tgz", - "integrity": "sha512-WKkQAW5A8mReAFbl6FwkSiTNsy478JAOrHROrzUqNDW7Q/FU3yvrvgueX7G0NHAkvMYUMLYTSaxqLFQIMJ+K3Q==", + "version": "12.1.2", + "resolved": "https://registry.npmjs.org/@cucumber/cucumber-expressions/-/cucumber-expressions-12.1.2.tgz", + "integrity": "sha512-3iSezyIpuc5NlEphh5gNiqGx4p9l+3n9qnhMbKP7ouJ1BjbTa7w+f8f5g13+n+i6TkJ08l+CtUrFXanoBbsxIQ==", "requires": { - "becke-ch--regex--s0-0-v1--base--pl--lib": "^1.4.0" + "becke-ch--regex--s0-0-v1--base--pl--lib": "1.4.0" } }, "@cucumber/gherkin": { - "version": "19.0.3", - "resolved": "https://registry.npmjs.org/@cucumber/gherkin/-/gherkin-19.0.3.tgz", - "integrity": "sha512-gWdMm8mfRk3P+VugJWvNALaQV5QnT+5RkqWy3tO+4NsMSQZPo5p4V4vXwriQZ/sZR1Wni5TDRztuRsKLgZ3XHA==", + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@cucumber/gherkin/-/gherkin-20.0.1.tgz", + "integrity": "sha512-1vXZETZYF3A9egC+N1EIeMobLQQ6VcQoGQ0NvHhkZ/NYXjJB+rPwMbZmhnDfqexhzJbWlA2CVNKc+VHrUobyyg==", "requires": { - "@cucumber/message-streams": "^2.0.0", - "@cucumber/messages": "^16.0.1" + "@cucumber/message-streams": "^3.0.0", + "@cucumber/messages": "^17.0.1" } }, "@cucumber/gherkin-streams": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@cucumber/gherkin-streams/-/gherkin-streams-2.0.2.tgz", - "integrity": "sha512-cKmXOBz4OwGlrHMBCc4qCC3KzLaqcEZ11nWWskIbv6jyfvlIRuM2OgEF6VLcNVewczifW1p6DrDj0OO+BeXocA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@cucumber/gherkin-streams/-/gherkin-streams-3.0.0.tgz", + "integrity": "sha512-vdTfSJx4z3Ju2vtresEM930chq3DVxnuQ1FFCI69m2Q83sa2mL8VEFvJ5fwlF7fY/fqLwop04W6B7lCkSZq7fg==", "requires": { - "@cucumber/gherkin": "^19.0.1", - "@cucumber/message-streams": "^2.0.0", - "@cucumber/messages": "^16.0.0", - "commander": "7.2.0", + "@cucumber/gherkin": "^20.0.0", + "@cucumber/message-streams": "^3.0.0", + "@cucumber/messages": "^17.0.0", + "commander": "8.0.0", "source-map-support": "0.5.19" - }, - "dependencies": { - "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" - } } }, "@cucumber/html-formatter": { - "version": "15.0.2", - "resolved": "https://registry.npmjs.org/@cucumber/html-formatter/-/html-formatter-15.0.2.tgz", - "integrity": "sha512-j+YGY4ytj78G/v1gZo53D+vuKXlTg/oxNwSCCGvRQo75+AqYDJSkm/vexXJQ5lY1rXAvlbZ9KI6jhg6LDs0YdQ==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@cucumber/html-formatter/-/html-formatter-16.0.1.tgz", + "integrity": "sha512-a/FPKreNILJWwjc/jXikqyLQRyGD6qY9XMSn5NdtJCXflzmPg3ihe9LMrR6DQTS1tr32kjuvsBdkv5lU80Xz6A==", "requires": { - "@cucumber/messages": "^16.0.1", - "commander": "7.2.0", + "@cucumber/messages": "^17.0.1", + "commander": "8.0.0", "source-map-support": "0.5.19" - }, - "dependencies": { - "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" - } } }, "@cucumber/message-streams": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@cucumber/message-streams/-/message-streams-2.1.0.tgz", - "integrity": "sha512-Yh3mw3qv6QL9NI/ihkZF8V9MX2GbnR6oktv34kC3uAbrQy9d/b2SZ3HNjG3J9JQqpV4B7Om3SPElJYIeo66TrA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@cucumber/message-streams/-/message-streams-3.0.0.tgz", + "integrity": "sha512-ABx91nKUebV8mLmpf7BsB3bmQ57CDAfj2EIZswThz+nJHYPAFlZ1JewI6ykFsR9RzJ7/QhgQs0KHeQh7nH/u1Q==", "requires": { - "@cucumber/messages": "^16.0.1" + "@cucumber/messages": "^17.0.0" } }, "@cucumber/messages": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-16.0.1.tgz", - "integrity": "sha512-80JcaAfQragFqR1rMhRwiqWL9HcR6Z4LDD2mfF0Lxg/lFkCNvmWa9Jl10NUNfFXYD555NKPzP/8xFo55abw8TQ==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-17.0.1.tgz", + "integrity": "sha512-cr07vBdiUnGgG3p2bUYhKswTwmk6yY62Fu/+Azvnd/eHar266+SkEs1UyO342ZXK56IyBtEE7T0X3Zn3V74q8A==", "requires": { - "@types/uuid": "8.3.0", + "@types/uuid": "8.3.1", "class-transformer": "0.4.0", "reflect-metadata": "0.1.13", "uuid": "8.3.2" } }, "@cucumber/query": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@cucumber/query/-/query-10.1.0.tgz", - "integrity": "sha512-6LzfJA62hqi8Nf3XGZjtLa1J8G5HrYNUMxWRcXxiGiOIq2erIaiWu8628NMmeIYLyf93LgiKHGcjNFTu7ZrTPA==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@cucumber/query/-/query-11.0.0.tgz", + "integrity": "sha512-GkjZX7p8h4OiajDrBXs/4E7qKhnW5gsqVXvJRI1Vv7bREpXc1W0Gc9S4UDgtx/YQ6djs0yBrjIbSHJRtEHYnIA==", "dev": true, "requires": { - "@cucumber/messages": "^16.0.1", + "@cucumber/messages": "^17.0.0", "@teppeis/multimaps": "2.0.0" } }, @@ -8156,9 +8126,9 @@ "dev": true }, "@types/uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg==" }, "@types/verror": { "version": "1.10.5",