]> git.koha-community.org Git - koha.git/commit
Bug 32898: Avoid hardcoding user/pass in tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 20 Feb 2023 14:07:44 +0000 (11:07 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 21 Feb 2023 12:10:15 +0000 (09:10 -0300)
commit53bebb413aec3796ce66311b0e66c872e01fee19
treea267df8bce477369a962713e341c8b335d3c9b19
parenta36f3ed7fe60e14129f2b4b66db1b61ebabe1f9a
Bug 32898: Avoid hardcoding user/pass in tests

This patch makes the authentication parameters be configurable through
env. Before this, it was hardcoded to koha/koha, which only works if the
ktd defaults haven't been tweaked.

If no env is defined, it fallsback to koha/koha.

In order to pass the ktd configured params, the tests need to be run
like:

$ yarn cypress run --env KOHA_USER=$KOHA_USER,KOHA_PASS=$KOHA_PASS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
t/cypress/integration/Agreements_spec.ts
t/cypress/integration/Licenses_spec.ts
t/cypress/integration/Packages_spec.ts
t/cypress/integration/Titles_spec.ts
t/cypress/support/commands.js