Skip to content

Does not respect configuration hooks #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
examosa opened this issue Mar 24, 2022 · 0 comments
Open

Does not respect configuration hooks #178

examosa opened this issue Mar 24, 2022 · 0 comments

Comments

@examosa
Copy link
Collaborator

examosa commented Mar 24, 2022

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:

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:

{
 "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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant