admin管理员组

文章数量:1296392

I'm trying to set up a test suite for our Gutenberg blocks plugin using the e2e-test-utils. Our environment is a multi-site WP install and I pass the WP_BASE_URL, WP_USERNAME and WP_PASSWORD as environment variables, so they are not stored anywhere in the repo.

I'm trying to make sure that the plugin I am testing on is activated using the asynchronous activatePlugin('name-of--our-plugin') function from the @wordpress/e2e-test-utils package. The problem is that this function assumes there is an existing administrator account with username: admin and password: password. This is not the case and because of our CI, I'd prefer not to have that kind of administrator account.

Is there a way to pass to the script administrator's credentials as environment variables just like I do it with the user? The admin user appears to be hardcoded in the config.js file.

本文标签: block editorHow to change the adminpassword when using the E2E Test Utils for Gutenberg