Skip to content
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

chore: UESIO_AUTOMATION_PASSWORD was not provided error when running nx commands #4579

Closed
techfg opened this issue Feb 6, 2025 · 0 comments · Fixed by #4580
Closed

chore: UESIO_AUTOMATION_PASSWORD was not provided error when running nx commands #4579

techfg opened this issue Feb 6, 2025 · 0 comments · Fixed by #4580

Comments

@techfg
Copy link
Collaborator

techfg commented Feb 6, 2025

When running nx commands, the nx graph needs to be built. To do this, nx navigates the folder structure looking for project.json/package.json to inspect and determine the graph.

Currently, the cypress.config.ts module contains code to check for which credentials to use during testing. If neither UESIO_DEV or UESIO_AUTOMATION_PASSWORD is found, it throws an error. This causes nx to fail on any nx command if it detects that the graph needs to be built and therefore UESIO_DEV or UESIO_AUTOMATION_PASSWORD must always be defined to use nx reliably.

Additionally, the check for whether or not UESIO_DEV has been set returns "truthy" even if the value of process.env.UESIO_DEV is something like false.

In short, the logic required to "run" the test should not interfere unless the tests are actually being run and even then, should only impact the test running itself.

The possible solutions to this are:

  1. Move the check (adjusting it to properly detect if UESIO_DEV is truthy) inside the default export itself
  2. Move the check (adjusting it to properly detect if UESIO_DEV is truthy) inside the setupNodeEvents option of cypress config so that it only runs upon initial test configuration during a run
  3. Simply use mock if UESIO_AUTOMATION_PASSWORD is not truthy

Image

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

Successfully merging a pull request may close this issue.

1 participant