Skip to content

Commit

Permalink
feat: override paths via env
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkenos committed Nov 26, 2023
1 parent 7adab4d commit d3750e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"env": {
"HEADLESS": "false",
"PARALLEL": "${input:parallel}",
"TAGS": "${input:tags}"
"TAGS": "${input:tags}",
"PATHS": "${file}"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Feature: III. Browser Context - Browser windows
Background:
Given I am on the "demo" site
And I click the "III. Browser Context" navigation item
# And I expect the section header "III. Browser Context" to exist
And I expect the section header "III. Browser Context" to exist

Scenario: S01: Open on same window
When I click the "#open-same-window" button
Expand Down Expand Up @@ -39,7 +39,7 @@ Feature: III. Browser Context - Browser windows
And I expect the page title to not be the "iframe" page's title
And I expect the url to not be the "iframe" page's url
And I expect the page to match the snapshot "iii-browser-context/3-browser-windows/page"

@debug
Scenario: S04: Iframe locators
When I focus on the "#iframe" iframe
Then I expect the "iframe" page's "tabs" elements text array to contain:
Expand Down
2 changes: 1 addition & 1 deletion src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function configure(overrides) {
format: [ 'summary', `html:${resultsDir}report.html`, `json:${resultsDir}report.json`, ...overrides?.format || [] ],
formatOptions: { snippetInterface: 'async-await', printAttachments: false },
parallel: debug ? 0 : +process.env.PARALLEL || overrides?.parallel || 0,
paths: (overrides?.paths || ['features/']).map(i => path.join(baseDir, i)),
paths: [process.env.PATHS].filter(Boolean) || (overrides?.paths || ['features/']).map(i => path.join(baseDir, i)),
require: [ path.join(__dirname, '../core/gherkin/*.def.ts')].concat((overrides?.require || ['fixtures/pages/**/*.def.ts']).map(i => path.join(baseDir, i))),
requireModule: ['ts-node/register/transpile-only', 'tsconfig-paths/register'],
strict: false,
Expand Down

0 comments on commit d3750e2

Please sign in to comment.