Skip to content

Commit

Permalink
Resume sending E2E test failures to slack (#3575)
Browse files Browse the repository at this point in the history
* Update: use e2e-enviornment to send failed test reports to slack
  • Loading branch information
deepakpathania authored Dec 24, 2021
1 parent 5ed3256 commit c06e3ea
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ env:
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
E2E_RETEST: 1
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}

jobs:
wcpay-e2e-tests:
Expand Down Expand Up @@ -125,9 +128,12 @@ jobs:
- name: Run E2E Tests
run: npm run test:e2e

# Upload screenshots if any
- name: Upload screenshots
# Archive screenshots if any
- name: Archive e2e test screenshots
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: screenshots
path: screenshots
name: e2e-screenshots
path: tests/e2e/screenshots
if-no-files-found: ignore
retention-days: 5
15 changes: 7 additions & 8 deletions tests/e2e/config/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require( 'path' );
const { config } = require( 'dotenv' );
const { jestConfig } = require( '@automattic/puppeteer-utils' );
const { useE2EJestConfig } = require( '@woocommerce/e2e-environment' );
const fs = require( 'fs' );

config( { path: path.resolve( __dirname, '.env' ) } );
Expand Down Expand Up @@ -47,16 +47,15 @@ if ( process.env.E2E_GROUP ) {
} );
}

module.exports = {
...jestConfig,
// eslint-disable-next-line react-hooks/rules-of-hooks
const testConfig = useE2EJestConfig( {
setupFiles: [],
rootDir: path.resolve( __dirname, '../../../' ),
roots: allowedPaths,
setupFilesAfterEnv: [
path.resolve( __dirname, '../setup/jest-setup.js' ),
...jestConfig.setupFilesAfterEnv,
],
testSequencer: path.resolve(
__dirname,
'../config/jest-custom-sequencer.js'
),
};
} );

module.exports = testConfig;
File renamed without changes.

0 comments on commit c06e3ea

Please sign in to comment.