Does not respect configuration hooks
- 主要语言
- JavaScript
- 星标
- 84
- 派生
- 30
- PR 合并指标
- 30 天内没有已合并 PR
描述
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?
贡献指南
调研方向
从示例 codecept.conf.js 和 @codeceptjs/configure hooks 开始,然后将显示的配置与经过 hooks 调整的值进行比较。跟踪 UI 如何解析和呈现配置;当由 setBrowser、setHeadlessWhen、setTestHost 和 setCommonPlugins 等 hooks 设置的配置出现在 UI 中,或者该行为被记录为有意设计时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- testing
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100