From 521cbffecd65493fdb1f430016ad6f8983b28246 Mon Sep 17 00:00:00 2001 From: Vitaliy Potapov Date: Sat, 7 Dec 2024 19:47:44 +0400 Subject: [PATCH] test: reporter-cucumber-merge: support several features --- ...error-in-step-failing-match-snapshot-1-darwin.txt | 1 + .../error-in-step-failing-match-snapshot-1-linux.txt | 1 + .../error-in-step-failing-match-snapshot-1-win32.txt | 1 + test/reporter-cucumber-merge/playwright.config.ts | 3 +-- test/reporter-cucumber-merge/test.mjs | 12 +++++------- 5 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 test/reporter-cucumber-merge/.features-gen/error-in-step/sample.feature.spec.js-snapshots/error-in-step-failing-match-snapshot-1-darwin.txt create mode 100644 test/reporter-cucumber-merge/.features-gen/error-in-step/sample.feature.spec.js-snapshots/error-in-step-failing-match-snapshot-1-linux.txt create mode 100644 test/reporter-cucumber-merge/.features-gen/error-in-step/sample.feature.spec.js-snapshots/error-in-step-failing-match-snapshot-1-win32.txt diff --git a/test/reporter-cucumber-merge/.features-gen/error-in-step/sample.feature.spec.js-snapshots/error-in-step-failing-match-snapshot-1-darwin.txt b/test/reporter-cucumber-merge/.features-gen/error-in-step/sample.feature.spec.js-snapshots/error-in-step-failing-match-snapshot-1-darwin.txt new file mode 100644 index 00000000..4f9744b5 --- /dev/null +++ b/test/reporter-cucumber-merge/.features-gen/error-in-step/sample.feature.spec.js-snapshots/error-in-step-failing-match-snapshot-1-darwin.txt @@ -0,0 +1 @@ +bla-bla \ No newline at end of file diff --git a/test/reporter-cucumber-merge/.features-gen/error-in-step/sample.feature.spec.js-snapshots/error-in-step-failing-match-snapshot-1-linux.txt b/test/reporter-cucumber-merge/.features-gen/error-in-step/sample.feature.spec.js-snapshots/error-in-step-failing-match-snapshot-1-linux.txt new file mode 100644 index 00000000..4f9744b5 --- /dev/null +++ b/test/reporter-cucumber-merge/.features-gen/error-in-step/sample.feature.spec.js-snapshots/error-in-step-failing-match-snapshot-1-linux.txt @@ -0,0 +1 @@ +bla-bla \ No newline at end of file diff --git a/test/reporter-cucumber-merge/.features-gen/error-in-step/sample.feature.spec.js-snapshots/error-in-step-failing-match-snapshot-1-win32.txt b/test/reporter-cucumber-merge/.features-gen/error-in-step/sample.feature.spec.js-snapshots/error-in-step-failing-match-snapshot-1-win32.txt new file mode 100644 index 00000000..4f9744b5 --- /dev/null +++ b/test/reporter-cucumber-merge/.features-gen/error-in-step/sample.feature.spec.js-snapshots/error-in-step-failing-match-snapshot-1-win32.txt @@ -0,0 +1 @@ +bla-bla \ No newline at end of file diff --git a/test/reporter-cucumber-merge/playwright.config.ts b/test/reporter-cucumber-merge/playwright.config.ts index 7c344040..f9bf3d4a 100644 --- a/test/reporter-cucumber-merge/playwright.config.ts +++ b/test/reporter-cucumber-merge/playwright.config.ts @@ -3,8 +3,7 @@ import { defineBddConfig, cucumberReporter } from 'playwright-bdd'; import { testTimeout } from '../reporter-cucumber-html/timeout'; const testDir = defineBddConfig({ - features: 'features/*.feature', - steps: 'features/*.ts', + featuresRoot: './features', }); const isShardRun = process.argv.some((a) => a.startsWith('--shard')); diff --git a/test/reporter-cucumber-merge/test.mjs b/test/reporter-cucumber-merge/test.mjs index c3f7cf76..1e6e9b08 100644 --- a/test/reporter-cucumber-merge/test.mjs +++ b/test/reporter-cucumber-merge/test.mjs @@ -12,6 +12,7 @@ const testDir = new TestDir(import.meta); test(testDir.name, () => { testDir.clearDir('actual-reports'); testDir.clearDir('blob-report'); + testDir.clearDir('features'); copyFeatures(); // uses features from reporter-cucumber-html execShard1(); @@ -54,11 +55,8 @@ function copyFeatures() { fs.cpSync('test/reporter-cucumber-html/check-report', testDir.getAbsPath('check-report'), { recursive: true, }); - fs.cpSync( - 'test/reporter-cucumber-html/.features-gen/features/sample.feature.spec.js-snapshots', - testDir.getAbsPath('.features-gen/features/sample.feature.spec.js-snapshots'), - { - recursive: true, - }, - ); + const snapshotsDir = '.features-gen/error-in-step/sample.feature.spec.js-snapshots'; + fs.cpSync(`test/reporter-cucumber-html/${snapshotsDir}`, testDir.getAbsPath(snapshotsDir), { + recursive: true, + }); }