diff --git a/tests/e2e/core-tests/specs/shopper/front-end-my-account.test.js b/tests/e2e/core-tests/specs/shopper/front-end-my-account.test.js index 5ad893c0a1e..ac283f2f20a 100644 --- a/tests/e2e/core-tests/specs/shopper/front-end-my-account.test.js +++ b/tests/e2e/core-tests/specs/shopper/front-end-my-account.test.js @@ -11,7 +11,7 @@ const runMyAccountPageTest = () => { describe('My account page', () => { it('allows customer to login', async () => { await merchant.logout(); -// await shopper.login(); + await shopper.login(); await expect(page).toMatch('Hello'); await expect(page).toMatchElement('.woocommerce-MyAccount-navigation-link', {text: 'Dashboard'}); await expect(page).toMatchElement('.woocommerce-MyAccount-navigation-link', {text: 'Orders'}); diff --git a/tests/e2e/env/CHANGELOG.md b/tests/e2e/env/CHANGELOG.md index d598349bc2e..67cfcb4979a 100644 --- a/tests/e2e/env/CHANGELOG.md +++ b/tests/e2e/env/CHANGELOG.md @@ -3,6 +3,7 @@ ## Added - Support for screenshots on test errors +- Slackbot to report errors to Slack channel ## Fixed diff --git a/tests/e2e/env/README.md b/tests/e2e/env/README.md index c109dc4f162..6ab21205bab 100644 --- a/tests/e2e/env/README.md +++ b/tests/e2e/env/README.md @@ -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) - [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 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.