Skip to content

Commit

Permalink
test: reporter-cucumber-merge: support several features
Browse files Browse the repository at this point in the history
vitalets committed Dec 7, 2024
1 parent a5c0566 commit 521cbff
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bla-bla
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bla-bla
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bla-bla
3 changes: 1 addition & 2 deletions test/reporter-cucumber-merge/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -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'));
12 changes: 5 additions & 7 deletions test/reporter-cucumber-merge/test.mjs
Original file line number Diff line number Diff line change
@@ -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,
});
}

0 comments on commit 521cbff

Please sign in to comment.