codeceptjs / codeceptjs/ui

Does not respect configuration hooks

Đang mở
#178 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
84
Fork
30
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với ví dụ codecept.conf.js và các hook của @codeceptjs/configure, sau đó so sánh cấu hình được hiển thị với các giá trị đã được điều chỉnh bởi hook. Theo dõi cách UI phân tích và trình bày cấu hình; hoàn tất khi cấu hình được thiết lập bởi các hook như setBrowser, setHeadlessWhen, setTestHost và setCommonPlugins xuất hiện trong UI hoặc hành vi này được ghi lại là có chủ đích.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
testing
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.