codeceptjs / codeceptjs/ui

Does not respect configuration hooks

Abierto
#178 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
84
Forks
30
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.