forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Replay integration for dev e2e tests (vercel#40955)
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: --> ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) @ijjk moving this here. Co-authored-by: JJ Kasper <[email protected]>
- Loading branch information
Showing
13 changed files
with
1,269 additions
and
415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -405,9 +405,27 @@ jobs: | |
timeout-minutes: 5 | ||
if: ${{needs.build.outputs.docsChange == 'nope'}} | ||
|
||
- run: NEXT_TEST_MODE=dev node run-tests.js --type e2e --timings -g ${{ matrix.group }}/3 | ||
- run: npx @replayio/playwright install chromium | ||
if: ${{needs.build.outputs.docsChange == 'nope'}} | ||
|
||
- run: node run-tests.js --type e2e --timings -g ${{ matrix.group }}/3 | ||
name: Run test/e2e (dev) | ||
if: ${{needs.build.outputs.docsChange == 'nope'}} | ||
env: | ||
RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testDevE2E / Group ${{ matrix.group }} / Node ${{ matrix.node }} | ||
RECORD_ALL_CONTENT: 1 | ||
RECORD_REPLAY: 1 | ||
NEXT_TEST_MODE: dev | ||
RECORD_REPLAY_TEST_METRICS: 1 | ||
RECORD_REPLAY_WEBHOOK_URL: ${{ secrets.RECORD_REPLAY_WEBHOOK_URL }} | ||
# DEBUG: pw:browser* | ||
|
||
- uses: replayio/[email protected] | ||
if: always() | ||
with: | ||
api-key: rwk_iKsQnEoQwKd31WAJxgN9ARPFuAlyXlVrDH4uhYpRnti | ||
public: true | ||
filter: ${{ 'function($v) { $v.metadata.test.result = "failed" }' }} | ||
|
||
- name: Upload test trace | ||
if: always() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const nextJest = require('next/jest') | ||
|
||
const createJestConfig = nextJest() | ||
|
||
// Any custom config you want to pass to Jest | ||
const customJestConfig = { | ||
testMatch: ['**/*.test.js', '**/*.test.ts', '**/*.test.tsx'], | ||
setupFilesAfterEnv: ['<rootDir>/jest-setup-after-env.ts'], | ||
verbose: true, | ||
rootDir: 'test', | ||
modulePaths: ['<rootDir>/lib'], | ||
transformIgnorePatterns: ['/next[/\\\\]dist/', '/\\.next/'], | ||
testTimeout: 60000, | ||
testRunner: '@replayio/jest/runner', | ||
} | ||
|
||
// createJestConfig is exported in this way to ensure that next/jest can load the Next.js config which is async | ||
module.exports = createJestConfig(customJestConfig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.