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

Document e2e test command options. #21962

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

sainthkh
Copy link
Contributor

@sainthkh sainthkh commented Apr 29, 2020

Description

Document e2e test command options to make it work correctly on all platforms.

How has this been tested?

Manually tested.

Screenshots

N/A

Types of changes

New feature for developers.

Checklist:

  • [N/A] My code is tested.
  • [N/A] My code follows the WordPress code style.
  • [N/A] My code follows the accessibility standards.
  • [N/A] My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • [N/A] I've updated all React Native files affected by any refactorings/renamings in this PR.

@gziolo gziolo added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Developer Documentation Documentation for developers labels Apr 29, 2020
docs/contributors/testing-overview.md Outdated Show resolved Hide resolved
docs/contributors/testing-overview.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated
@@ -223,6 +223,8 @@
"test": "npm run lint && npm run test-unit",
"test-e2e": "wp-scripts test-e2e --config packages/e2e-tests/jest.config.js",
"test-e2e:debug": "wp-scripts --inspect-brk test-e2e --config packages/e2e-tests/jest.config.js --puppeteer-devtools",
"test-e2e:open-browser": "cross-env PUPPETEER_HEADLESS=false PUPPETEER_SLOWMO=80 wp-scripts test-e2e --config packages/e2e-tests/jest.config.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With updates added to the documentation, do you think it's still valuable to have this script included here? It's not that much to type npm run test-e2e:watch -- --puppeteer-interactive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I don't think we need them any more. I didn't know that the options existed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why it wasn't documented :(

Copy link
Contributor Author

@sainthkh sainthkh Apr 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's how things work in software development. Computer wants everything but we sometimes miss one or two. That's why we work together to find those missing pieces.

Thanks for the great reivew.

@sainthkh sainthkh changed the title Add commands for observing e2e tests. Document e2e test command options. Apr 29, 2020
@sainthkh sainthkh force-pushed the add/observe-e2e-on-windows branch from 1a80810 to b78ee5b Compare April 29, 2020 04:34
@sainthkh
Copy link
Contributor Author

Changed the title of this PR to Document e2e test command options. and edited the content.

@sainthkh sainthkh requested a review from gziolo April 29, 2020 04:37
```

If you're using a different setup, you can provide the base URL, username and password like this:

```bash
WP_BASE_URL=http://localhost:8888 WP_USERNAME=admin WP_PASSWORD=password npm run test-e2e
npm run test-e2e -- --wordpress-base-url=http://localhost:8888 --wordpress-username=admin --wordpress-password=password
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely forgot about that, thank you for bringing it up as well :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it was added in #14717 but it didn't touch this file.

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you for the initiative 👍

@gziolo gziolo merged commit ea4fa88 into WordPress:master Apr 29, 2020
@github-actions github-actions bot added this to the Gutenberg 8.1 milestone Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants