E2E Test Utils – Hardcoded administrator user/password #30736
Labels
[Package] E2E Test Utils
/packages/e2e-test-utils
[Type] Bug
An existing feature does not function as intended
Description
The default administrator user used for E2E testing is hardcoded as
user: admin
andpassword: password
in the config.js. This gets automatically used by the testing suite if the current user is anything else butadmin
as you can see inswitchUserToAdmin()
at switch-user-to-admin.js. The suite does not actually test whether the current user has administrators rights, instead it tests for the username beingadmin
.This seems a strange default setting, considering that WP does not let you, by default, create a user with username
admin
(unless you edit directly in database).Step-by-step reproduction instructions
WP_USERNAME
supplied byprocess.env.WP_USERNAME
is notadmin
.Expected behaviour
Either:
WP_USERNAME
having administrator's rightsWP_ADMIN_USERNAME
andWP_ADMIN_PASSWORD
for administrator's loginActual behaviour
Uses
admin
andpassword
as the administrator's login details if the WP_USERNAME is notadmin
.WordPress information
Device information
The text was updated successfully, but these errors were encountered: