-
Notifications
You must be signed in to change notification settings - Fork 118
fix(e2e): consolidate frontend E2E to Cypress and restore CI (#967) #984
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
Open
DevHusnainAi
wants to merge
29
commits into
OWASP:main
Choose a base branch
from
DevHusnainAi:feature/consolidate-cypress-e2e
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
61281cc
fix(e2e): complete Cypress migration and stabilize make e2e for #523
PRAteek-singHWY cd56254
Merge branch 'main' into fix/e2e-tests-523
PRAteek-singHWY 46e1801
Merge branch 'main' into fix/e2e-tests-523
PRAteek-singHWY dfe2345
Merge branch 'main' into fix/e2e-tests-523
PRAteek-singHWY 56d4dad
fix(e2e): restore playwright install in install-python
PRAteek-singHWY 07066de
Merge remote-tracking branch 'upstream/main' into fix/e2e-tests-523
PRAteek-singHWY 1e0c4c1
fix(e2e): fail fast if Flask never becomes ready before e2e run
PRAteek-singHWY 48716d9
chore: document that playwright install is required for Python embedd…
northdpole 1239070
chore: resolve merge conflicts and consolidate foundation
DevHusnainAi 671ffd1
Added line with which venv is created in Makefile
DevHusnainAi 7330217
Modified e2e to work with cypress
DevHusnainAi 5e4908e
Modified comke.cy.js
DevHusnainAi a6c0f62
Merge remote-tracking branch 'upstream/main' into feature/consolidate…
DevHusnainAi 7f8ae86
ci(e2e): seed e2e db via create_all, restore Cypress CI
DevHusnainAi 5c3d6ee
test(e2e): port legacy jest/puppeteer flows to cypress
DevHusnainAi 755449d
chore(e2e): remove dead puppeteer/jest-puppeteer tooling
DevHusnainAi 0348a19
docs: document local cypress run
DevHusnainAi 14bdb00
ci(e2e): pin checkout creds and clarify e2e-db docs
DevHusnainAi 6eed40a
Merge branch 'OWASP:main' into feature/consolidate-cypress-e2e
DevHusnainAi 823db92
e2e: replace live upstream_sync with a checked-in fixture seed
DevHusnainAi 1f66827
fix(e2e): scroll SearchName to top on mount, fix accordion-order flake
DevHusnainAi df51473
Merge branch 'main' into feature/consolidate-cypress-e2e
DevHusnainAi 667752b
Merge branch 'main' into feature/consolidate-cypress-e2e
DevHusnainAi d2e8cc5
Merge branch 'main' into feature/consolidate-cypress-e2e
DevHusnainAi 8f7d932
Merge branch 'main' into feature/consolidate-cypress-e2e
DevHusnainAi 6ff3aa7
Merge branch 'main' into feature/consolidate-cypress-e2e
DevHusnainAi 6cad190
Merge branch 'main' into feature/consolidate-cypress-e2e
DevHusnainAi 68437f6
Merge branch 'main' into feature/consolidate-cypress-e2e
DevHusnainAi 394e236
Merge branch 'main' into feature/consolidate-cypress-e2e
DevHusnainAi 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,51 @@ | ||
| # name: Test-e2e | ||
| # on: [push, pull_request] | ||
| # jobs: | ||
| # build: | ||
| # name: Test-e2e | ||
| # runs-on: ubuntu-latest | ||
| # timeout-minutes: 10 | ||
| # steps: | ||
| # - name: Check out code | ||
| # uses: actions/checkout@v4 | ||
| # - uses: actions/setup-python@v4 | ||
| # with: | ||
| # python-version: '3.11.4' | ||
| # cache: 'pip' | ||
| # - uses: actions/setup-node@v3 | ||
| # with: | ||
| # cache: 'yarn' | ||
| # node-version: 'v20.12.1' | ||
| # - name: Install dependencies | ||
| # run: | | ||
| # sudo apt-get update | ||
| # sudo apt-get install -y python3-setuptools python3-pip python3-virtualenv chromium-browser libgbm1 | ||
| # make install | ||
| # - name: DB setup | ||
| # run: | | ||
| # make migrate-upgrade | ||
| # python cre.py --upstream_sync | ||
| # # - name: Run app and e2e tests | ||
| # run: | | ||
| # make e2e | ||
| name: Test-e2e | ||
| on: [push, pull_request] | ||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Test-e2e | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12.3' | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20.12.1' | ||
| cache: 'yarn' | ||
| - name: Install system dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y \ | ||
| python3-setuptools \ | ||
| python3-virtualenv \ | ||
| python3-pip \ | ||
| libxml2-dev \ | ||
| libxslt-dev | ||
| - name: Create venv and install Python deps (no Playwright — Cypress ships its own browser) | ||
| run: | | ||
| pip install --upgrade pip setuptools virtualenv | ||
| virtualenv -p python3 venv | ||
| make install-deps-python | ||
| - name: Install Node deps (root for Cypress, frontend for build) | ||
| run: | | ||
| yarn install | ||
| make install-deps-typescript | ||
| - name: Seed e2e database (schema from models via create_all, data from checked-in fixture) | ||
| run: make e2e-db | ||
|
DevHusnainAi marked this conversation as resolved.
|
||
| - name: Run Cypress e2e | ||
| run: make e2e | ||
| - name: Upload Cypress screenshots on failure | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cypress-screenshots | ||
| path: cypress/screenshots | ||
| if-no-files-found: ignore | ||
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 was deleted.
Oops, something went wrong.
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,10 @@ | ||
| const { defineConfig } = require('cypress'); | ||
|
|
||
| module.exports = defineConfig({ | ||
| video: false, | ||
|
DevHusnainAi marked this conversation as resolved.
|
||
| e2e: { | ||
| baseUrl: 'http://127.0.0.1:5000', | ||
| specPattern: 'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}', | ||
| supportFile: false, | ||
| }, | ||
| }); | ||
This file was deleted.
Oops, something went wrong.
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.