Does not respect configuration hooks
- Dominant language
- JavaScript
- Stars
- 84
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
The UI does not appear to account for configuration set through hooks from `@codeceptjs/configure`.
As an example, I have the following `codecept.conf.js`:
```js
const {
setHeadlessWhen,
setCommonPlugins,
setBrowser,
setTestHost
} = require('@codeceptjs/configure');
const productionHost = 'https://example.com';
setBrowser(process.env.BROWSER || 'chromium');
setHeadlessWhen(process.env.HEADLESS);
setTestHost(process.env.TESTHOST || productionHost)
setCommonPlugins();
exports.config = {
name: 'example-ui-tests',
tests: './integration/**/*.test.ts',
output: './output',
helpers: {
Playwright: {
show: true,
waitForNavigation: 'networkidle',
},
},
bootstrap: null,
include: {
I: './custom-steps.js',
},
require: ['ts-node/register']
};
```
When I run the UI and view the config, it's as follows:
```js
{
"output": "./output",
"helpers": {
"Playwright": {
"show": true,
"waitForNavigation": "networkidle"
}
},
"include": {
"I": "./custom-steps.js"
},
"mocha": {},
"bootstrap": null,
"timeout": null,
"teardown": null,
"hooks": [],
"gherkin": {},
"plugins": {
"screenshotOnFail": {
"enabled": true
}
},
"stepTimeout": 0,
"stepTimeoutOverride": [
{
"pattern": "wait.*",
"timeout": 0
},
{
"pattern": "amOnPage",
"timeout": 0
}
],
"name": "example-ui-tests",
"tests": "./integration/**/*.test.ts",
"require": [
"ts-node/register"
]
}
```
It doesn't seem to be applying any hooks to the parsed config. Is this intended behavior with a workaround or a bug?
Contributor guide
Research direction
Start with the example codecept.conf.js and the @codeceptjs/configure hooks, then compare the displayed configuration with the hook-adjusted values. Trace how the UI parses and presents the configuration; done means configuration set by hooks such as setBrowser, setHeadlessWhen, setTestHost, and setCommonPlugins appears in the UI or the behavior is documented as intentional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100