Skip to content

Commit

Permalink
test: adding dom tests and separating e2e (#2470)
Browse files Browse the repository at this point in the history
Separating `test` from `e2e`

`just test-frontend` will run as part of normal CI flow and will just be
unit and dom test so they should be very fast

`just e2e-frontend` will run `ftl dev --recreate` then run playwright
tests against the running ftl server. These have moved to the merge
queue flow to avoid delays on PRs.
  • Loading branch information
wesbillman authored Aug 21, 2024
1 parent f2686f9 commit e60586c
Show file tree
Hide file tree
Showing 13 changed files with 2,427 additions and 71 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,21 @@ jobs:
- uses: actions/checkout@v4
- uses: cashapp/activate-hermit@v1
- run: go-arch-lint check || true
console-e2e:
name: Console e2e
if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-all')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Build Cache
uses: ./.github/actions/build-cache
- name: Console NPM Install
run: just npm-install
- name: Console e2e
run: just e2e-frontend
integration-shard:
name: Shard Integration Tests
if: github.event_name != 'pull_request' || github.event.action == 'enqueued' || contains( github.event.pull_request.labels.*.name, 'run-all')
Expand Down
5 changes: 4 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ test-scripts:
scripts/tests/test-ensure-frozen-migrations.sh

test-frontend: build-frontend
@cd frontend && npx playwright install --with-deps && npm run test
@cd frontend && npm run test

e2e-frontend: build-frontend
@cd frontend && npx playwright install --with-deps && npm run e2e

# Lint the frontend
lint-frontend: build-frontend
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit e60586c

Please sign in to comment.