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

wp-env doesn't use WP_TESTS_EMAIL nor WP_TESTS_TITLE from .wp-env.json #42419

Open
MrJnrman opened this issue Jul 14, 2022 · 2 comments · May be fixed by #42421
Open

wp-env doesn't use WP_TESTS_EMAIL nor WP_TESTS_TITLE from .wp-env.json #42419

MrJnrman opened this issue Jul 14, 2022 · 2 comments · May be fixed by #42421
Labels
[Tool] Env /packages/env [Type] Bug An existing feature does not function as intended

Comments

@MrJnrman
Copy link

Description

According to the documentation, I should be able to define my admin email and blog title per environment using WP_TESTS_EMAIL and WP_TESTS_TITLE respectively. This is not the case in practice. The blog title will default to the parent folder from which wp-env is called and the admin email will always be set to [email protected]

Step-by-step reproduction instructions

  1. Clone this repo
  2. Navigate to the env package using cd packages/env
  3. Install dependencies using npm i
  4. Create a .wp-env.json file in the root of the package folder with the contents below:
{
	"phpVersion": "7.4",
	"core": null,
	"plugins": [],
	"config": {
		"WP_TESTS_EMAIL": "[email protected]",
		"WP_TESTS_TITLE": "Development"
	},
	"env": {
		"development": {},
		"tests": {
			"config": {
				"WP_TESTS_EMAIL": "[email protected]",
				"WP_TESTS_TITLE": "Testing"
			}
		}
	}
}

  1. Build your environment by running ./bin/wp-env.
  2. Navigate to localhost:8888 / localhost:8889 and observe that the blog title doesn't match what is defined in .wp-env.json for the respective environment.
  3. Navigate to localhost:8888/wp-admin/users.php / localhost:8889/wp-admin/users.php and observe that admin email is still set to [email protected]

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

@noahtallen noahtallen added [Tool] Env /packages/env [Type] Bug An existing feature does not function as intended labels Jul 14, 2022
@t-hamano
Copy link
Contributor

Related PR: #42421

@LeonAdato
Copy link

I'm also having this problem.

Given that some of the tests require an email registration process;

AND that changing the default email requires a confirmation first from "wordpress@examplecom" (which is never going to happen)

This makes it impossible to test certain use-cases.

Being able to pre-set the admin email is an important (if not crucial) feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Tool] Env /packages/env [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants