-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[14494] - Improve e2e testing docs and add cli args #14673
Changes from all commits
17ab0f2
2988861
5cb0335
2f859f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,4 +50,10 @@ if ( hasCliArg( '--puppeteer-interactive' ) ) { | |
process.env.PUPPETEER_SLOWMO = getCliArg( '--puppeteer-slowmo' ) || 80; | ||
} | ||
|
||
if ( hasCliArg( '--puppeteer-local' ) ) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello @gziolo :)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, the defaults are: process.env.WP_BASE_URL = 'http://localhost:8889';
process.env.WP_USERNAME = 'admin';
process.env.WP_PASSWORD = 'password'; So there is no need to set them explicitly. We need the opposite, to have a way to override all those 3 values: if ( hasCliArg( '--wordpress-host' ) ) {
process.env.WP_BASE_URL = getCliArg( '--wordpress-host' );
}
if ( hasCliArg( '--wordpress-username' ) ) {
process.env. WP_USERNAME = getCliArg( '--wordpress-username' );
}
if ( hasCliArg( '--wordpress-password' ) ) {
process.env. WP_PASSWORD = getCliArg( '--wordpress-password' );
} or even better something which uses look up table and loops over it. |
||
process.env.WP_BASE_URL = 'http://localhost:8888'; | ||
process.env.WP_USERNAME = 'admin'; | ||
process.env.WP_PASSWORD = 'password'; | ||
} | ||
|
||
jest.run( [ ...config, ...runInBand, ...getCliArgs( cleanUpPrefixes ) ] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it look as follows? /cc @draganescu
In watch mode, you rather don't pass the name of the file as by default it runs only for modified files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this change based on this PR's description: #14129
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but I didn't update the PR's description with the changes in the comments. @gziolo is right, in the end it was developed as: