-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: add option --unused-steps to bddgen export, see #113
- Loading branch information
Showing
12 changed files
with
84 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: cli-command-export | ||
Scenario: Simple scenario | ||
Given I am on todo page | ||
Then visible todos count is 2 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,26 @@ | ||
import { expect } from '@playwright/test'; | ||
import { test, getTestName, execPlaywrightTest, BDDGEN_CMD } from '../helpers.mjs'; | ||
import { test, TestDir, execPlaywrightTest, BDDGEN_CMD } from '../helpers.mjs'; | ||
|
||
const testDir = new TestDir(import.meta); | ||
|
||
test(`${testDir.name} (all steps)`, () => { | ||
const stdout = execPlaywrightTest(testDir.name, `${BDDGEN_CMD} export`); | ||
expect(stdout).toContain('Using config: playwright.config.ts'); | ||
expect(stdout).toContain('List of all steps (5):'); | ||
|
||
test(getTestName(import.meta), (t) => { | ||
const stdout = execPlaywrightTest(t.name, `${BDDGEN_CMD} export`); | ||
expect(stdout).toContain('List of all steps found by config: playwright.config.ts'); | ||
expect(stdout).toContain('* Given I am on todo page'); | ||
expect(stdout).toContain('* When I add todo {string}'); | ||
expect(stdout).toContain('* Then visible todos count is (\\d+)'); | ||
expect(stdout).toContain('* When some step'); | ||
expect(stdout).toContain('* Given I am on another todo page'); | ||
}); | ||
|
||
test(`${testDir.name} (unused steps)`, () => { | ||
const stdout = execPlaywrightTest(testDir.name, `${BDDGEN_CMD} export --unused-steps`); | ||
expect(stdout).toContain('Using config: playwright.config.ts'); | ||
expect(stdout).toContain(`List of unused steps (3):`); | ||
|
||
expect(stdout).toContain('* When I add todo {string}'); | ||
expect(stdout).toContain('* When some step'); | ||
expect(stdout).toContain('* Given I am on another todo page'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters