-
Notifications
You must be signed in to change notification settings - Fork 3
E2E testing #493
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
Merged
Merged
E2E testing #493
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
5198097
Initted Playwright
renatodellosso f53844e
Move old tests into tests/unit
renatodellosso a222904
Config web server for playwright
renatodellosso 7898a8f
Add tests for index page
renatodellosso 766450d
1.2.26
gearbox4026 c153ece
Update Jest configuration and CI workflows for Playwright tests
renatodellosso aa1a0af
Merge branch 'e2e-testing' of github.com:Decatur-Robotics/Gearbox int…
renatodellosso 1691b78
Fix package.json formatting
renatodellosso 1a34bce
Don't error if ROLLBAR_TOKEN isn't set
renatodellosso ae8a167
Update environment configuration and CI workflows for Playwright tests
renatodellosso a761475
Set up sign in function for e2e tests
renatodellosso b66169e
Use mongodb in e2e tests
renatodellosso 5aebd52
No more Resend errors when API key is missing
renatodellosso aa4cf8c
Fewer Rollbar errors, no request helper constructor logs
renatodellosso a488833
Add API key check in request method and safeguard user ID assignment …
renatodellosso e510aec
Fix error in allCompetitionsToPairings when TBA is disabled
renatodellosso bfadfff
Add NextAuth vars to .env.test
renatodellosso 0403029
Merge branch 'main' into e2e-testing
renatodellosso c4410ed
Log Mongo connection string
renatodellosso 3d612e6
Merge branch 'e2e-testing' of github.com:Decatur-Robotics/Gearbox int…
renatodellosso 2b10cb1
Log on mongo connection
renatodellosso 5b57044
Clean up uri determination
renatodellosso 008acf3
Fix sign in
renatodellosso 6e7f841
Fixed some profile tests
renatodellosso f690bf6
Increase retries and workers for CI in Playwright configuration
renatodellosso a5953b9
Don't add BASE_URL twice
renatodellosso a571a31
Shard playwright CI tests
renatodellosso a78dc1f
Update Playwright test command to use npm script
renatodellosso 36389f9
Update CI workflow to set permissions and modify Playwright test command
renatodellosso 51c018d
Bump version to 1.3.0, add note about requiring individual shard in G…
renatodellosso bfcd395
Repeat tests in CI
renatodellosso 7e7324d
Merge branch 'main' into e2e-testing
renatodellosso 0812bce
Fix signUp and signIn being flaky
renatodellosso 3f845bf
Merge branch 'e2e-testing' of github.com:Decatur-Robotics/Gearbox int…
renatodellosso bcac56f
Tweak line breaks
renatodellosso File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,9 +1,20 @@ | ||
| NEXT_PUBLIC_API_URL=http://localhost:3000/api | ||
| NEXTAUTH_URL=http://localhost:3000/ | ||
| NEXTAUTH_SECRET=testsecret | ||
|
|
||
| NEXT_PUBLIC_API_URL=/api/ | ||
|
|
||
| DEVELOPER_EMAILS=["test@gmail.com"] | ||
|
|
||
| TOA_URL=https://example.com | ||
| TOA_APP_ID=123 | ||
| TOA_KEY=456 | ||
|
|
||
| DEFAULT_IMAGE=https://example.com/default.jpg | ||
| DEFAULT_IMAGE=https://example.com/default.jpg | ||
|
|
||
| BASE_URL_FOR_PLAYWRIGHT=http://localhost:3000/ | ||
| ENABLE_TEST_SIGNIN_ROUTE=true | ||
| FALLBACK_MONGODB_URI=mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000 | ||
|
|
||
| ENV_FILE=.env.test | ||
|
|
||
| DB=playwright_tests |
This file contains hidden or 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
This file contains hidden or 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,71 @@ | ||
| name: Playwright Tests | ||
| on: [workflow_dispatch, workflow_call] | ||
| jobs: | ||
| e2e_tests: | ||
| timeout-minutes: 60 | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| # Make sure to require each shard in GitHub! | ||
| shardIndex: [1, 2, 3, 4] | ||
| shardTotal: [4] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Install Playwright browsers | ||
| run: npx playwright install --with-deps | ||
|
|
||
| - name: Start MongoDB | ||
| uses: supercharge/mongodb-github-action@1.12.0 | ||
| with: | ||
| mongodb-version: "8.0" | ||
|
|
||
| - name: Run Playwright tests | ||
| run: npx cross-env NODE_ENV=test playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | ||
|
|
||
| - name: Upload blob report to GitHub Actions Artifacts | ||
| if: ${{ !cancelled() }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: blob-report-${{ matrix.shardIndex }} | ||
| path: blob-report | ||
| retention-days: 1 | ||
|
|
||
| merge_reports: | ||
|
Comment on lines
+5
to
+42
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
|
||
| # Merge reports after playwright-tests, even if some shards have failed | ||
| if: ${{ !cancelled() }} | ||
| needs: [e2e_tests] | ||
|
|
||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Download blob reports from GitHub Actions Artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: all-blob-reports | ||
| pattern: blob-report-* | ||
| merge-multiple: true | ||
|
|
||
| - name: Merge into HTML Report | ||
| run: npx playwright merge-reports --reporter html ./all-blob-reports | ||
|
|
||
| - name: Upload HTML report | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: html-report--attempt-${{ github.run_attempt }} | ||
| path: playwright-report | ||
| retention-days: 14 | ||
|
Comment on lines
+44
to
+71
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.