update changelog, readme, fix test broken to test the bot
This commit is contained in:
parent
3fa03509db
commit
91a4283075
|
@ -11,7 +11,7 @@ const runMyAccountPageTest = () => {
|
||||||
describe('My account page', () => {
|
describe('My account page', () => {
|
||||||
it('allows customer to login', async () => {
|
it('allows customer to login', async () => {
|
||||||
await merchant.logout();
|
await merchant.logout();
|
||||||
// await shopper.login();
|
await shopper.login();
|
||||||
await expect(page).toMatch('Hello');
|
await expect(page).toMatch('Hello');
|
||||||
await expect(page).toMatchElement('.woocommerce-MyAccount-navigation-link', {text: 'Dashboard'});
|
await expect(page).toMatchElement('.woocommerce-MyAccount-navigation-link', {text: 'Dashboard'});
|
||||||
await expect(page).toMatchElement('.woocommerce-MyAccount-navigation-link', {text: 'Orders'});
|
await expect(page).toMatchElement('.woocommerce-MyAccount-navigation-link', {text: 'Orders'});
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
## Added
|
## Added
|
||||||
|
|
||||||
- Support for screenshots on test errors
|
- Support for screenshots on test errors
|
||||||
|
- Slackbot to report errors to Slack channel
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
|
|
|
@ -134,6 +134,27 @@ Depending on the project and testing scenario, the built in testing environment
|
||||||
- [Built In Container](https://github.com/woocommerce/woocommerce/tree/trunk/tests/e2e/env/builtin.md)
|
- [Built In Container](https://github.com/woocommerce/woocommerce/tree/trunk/tests/e2e/env/builtin.md)
|
||||||
- [External Container](https://github.com/woocommerce/woocommerce/tree/trunk/tests/e2e/env/external.md)
|
- [External Container](https://github.com/woocommerce/woocommerce/tree/trunk/tests/e2e/env/external.md)
|
||||||
|
|
||||||
|
### Slackbot Setup
|
||||||
|
|
||||||
|
The test runner has support for posting a message and screenshot to a Slack channel when there is an error in a test. It currently supports both Travis CI and Github actions.
|
||||||
|
|
||||||
|
To implement the Slackbot in your CI:
|
||||||
|
|
||||||
|
- Create a [Slackbot App](https://slack.com/help/articles/115005265703-Create-a-bot-for-your-workspace)
|
||||||
|
- Give the app the following permissions:
|
||||||
|
- `channel:join`
|
||||||
|
- `chat:write`
|
||||||
|
- `files:write`
|
||||||
|
- `incoming-webhook`
|
||||||
|
- Add the app to your channel
|
||||||
|
- In your CI environment
|
||||||
|
- Add the environment variable `WC_E2E_SCREENSHOTS=1`
|
||||||
|
- Add your app Oauth token to a CI secret `E2E_SLACK_TOKEN`
|
||||||
|
- Add the Slack channel name (without the #) to a CI secret `E2E_SLACK_CHANNEL`
|
||||||
|
- Add the secrets to the test run using the same variable names
|
||||||
|
|
||||||
|
To test your setup, create a pull request that triggers an error in the E2E tests.
|
||||||
|
|
||||||
## Additional information
|
## Additional information
|
||||||
|
|
||||||
Refer to [`tests/e2e/core-tests`](https://github.com/woocommerce/woocommerce/tree/trunk/tests/e2e/core-tests) for some test examples, and [`tests/e2e`](https://github.com/woocommerce/woocommerce/tree/trunk/tests/e2e) for general information on e2e tests.
|
Refer to [`tests/e2e/core-tests`](https://github.com/woocommerce/woocommerce/tree/trunk/tests/e2e/core-tests) for some test examples, and [`tests/e2e`](https://github.com/woocommerce/woocommerce/tree/trunk/tests/e2e) for general information on e2e tests.
|
||||||
|
|
Loading…
Reference in New Issue