Skip to content

Commit ef2c65e

Browse files
Plataneclaude
andcommitted
Migrate e2e tests from Cypress to Playwright
- Replace deprecated @grafana/e2e (Cypress) with @grafana/plugin-e2e (Playwright) - Add full e2e scenario: ingest logs into Quickwit, create datasource via UI, verify log explorer returns hits, cleanup - Use unique RUN_ID per test run for isolation - Add Quickwit version matrix (edge) to CI - Add job timeout (15min) and health checks for both Grafana and Quickwit - Parameterize Quickwit Docker image version via QUICKWIT_VERSION env var - Bump default Grafana to 12.4.0 (required for react/jsx-runtime external) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e3ff99e commit ef2c65e

10 files changed

Lines changed: 1164 additions & 5436 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,13 @@ jobs:
7878

7979
e2e:
8080
runs-on: ubuntu-latest
81+
timeout-minutes: 15
8182
needs: build
8283
strategy:
8384
fail-fast: false
8485
matrix:
8586
GRAFANA_IMAGE: ${{ fromJson(needs.build.outputs.e2e-matrix) }}
87+
QUICKWIT_VERSION: [edge]
8688
steps:
8789
- uses: actions/checkout@v6
8890

@@ -101,25 +103,20 @@ jobs:
101103
- name: Install dependencies
102104
run: npm ci
103105

104-
- name: Start Grafana (${{ matrix.GRAFANA_IMAGE.name }}:${{ matrix.GRAFANA_IMAGE.version }})
106+
- name: Install Playwright
107+
run: npx playwright install --with-deps chromium
108+
109+
- name: Start Grafana (${{ matrix.GRAFANA_IMAGE.name }}:${{ matrix.GRAFANA_IMAGE.version }}) + Quickwit (${{ matrix.QUICKWIT_VERSION }})
105110
run: docker compose up -d --build
106111
env:
107112
GRAFANA_VERSION: ${{ matrix.GRAFANA_IMAGE.version }}
108113
GRAFANA_IMAGE: ${{ matrix.GRAFANA_IMAGE.name }}
114+
QUICKWIT_VERSION: ${{ matrix.QUICKWIT_VERSION }}
109115

110-
- name: Wait for Grafana to start
116+
- name: Wait for Grafana and Quickwit to start
111117
run: |
112-
for i in $(seq 1 30); do
113-
if curl -s http://localhost:3000/api/health | grep -q "ok"; then
114-
echo "Grafana is ready"
115-
exit 0
116-
fi
117-
echo "Waiting for Grafana... ($i/30)"
118-
sleep 2
119-
done
120-
echo "Grafana failed to start"
121-
docker compose logs grafana
122-
exit 1
118+
timeout 60 bash -c 'until curl -sf http://localhost:3000/api/health; do sleep 2; done' || { docker compose logs grafana; exit 1; }
119+
timeout 60 bash -c 'until curl -sf http://localhost:7280/health/readyz; do sleep 2; done' || { docker compose logs quickwit; exit 1; }
123120
124121
- name: Run e2e tests
125122
run: npm run e2e

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ artifacts/
3131
work/
3232
ci/
3333
e2e-results/
34-
**/cypress/videos
35-
**/cypress/report.json
34+
playwright-report/
35+
test-results/
36+
playwright/.auth/
3637

3738
# Editor
3839
.idea

cypress.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

cypress/integration/01-smoke.spec.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.0'
22

33
services:
44
quickwit:
5-
image: quickwit/quickwit:edge
5+
image: quickwit/quickwit:${QUICKWIT_VERSION:-edge}
66
environment:
77
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:7281
88
- QW_ENABLE_OPENTELEMETRY_OTLP_EXPORTER=true
@@ -16,7 +16,7 @@ services:
1616
build:
1717
context: ./.config
1818
args:
19-
grafana_version: ${GRAFANA_VERSION:-12.1.0}
19+
grafana_version: ${GRAFANA_VERSION:-12.4.0}
2020
grafana_image: ${GRAFANA_IMAGE:-grafana-oss}
2121
ports:
2222
- 3000:3000/tcp

0 commit comments

Comments
 (0)