front: handle uncaught exceptions for e2e tests #20810
build.yml
on: pull_request
Matrix: Build
Check dockerfiles
9s
Check scripts
6s
Check generated railjson sync
22s
Check railjson generator
41s
Check commits
6s
Check final newline
1m 35s
Check integration tests
1m 30s
Check osrd schema
19s
Check toml
8s
Check infra schema sync
16s
Check reuse compliance
13s
Check front rtk sync
1m 9s
Check core
4m 54s
Check editoast tests
7m 20s
Check editoast lints
7m 36s
Check editoast openapi
44s
Check gateway
3m 21s
Check osrdyne
3m 47s
Check front
3m 37s
Integration tests
1m 9s
End to end tests
6m 32s
Annotations
7 errors, 3 warnings, and 1 notice
Check commits
Process completed with exit code 1.
|
[chromium] › 008-train-schedule.spec.ts:82:3 › Verify train schedule elements and filters › Loading trains and verifying simulation result:
tests/logging-fixture.ts#L21
1) [chromium] › 008-train-schedule.spec.ts:82:3 › Verify train schedule elements and filters › Loading trains and verifying simulation result
Error: Test failed due to uncaught exception: "TypeError: Cannot read properties of undefined (reading 'values')"
at logging-fixture.ts:21
19 | // Handle uncaught exceptions
20 | page.on('pageerror', (exception) => {
> 21 | throw new Error(`Test failed due to uncaught exception: "${exception}"`);
| ^
22 | });
23 |
24 | // Run the actual test
at Page.<anonymous> (/app/front/tests/logging-fixture.ts:21:13)
|
[chromium] › 008-train-schedule.spec.ts:82:3 › Verify train schedule elements and filters › Loading trains and verifying simulation result:
tests/pages/operational-studies/scenario-timetable-section.ts#L157
1) [chromium] › 008-train-schedule.spec.ts:82:3 › Verify train schedule elements and filters › Loading trains and verifying simulation result
Error: page.waitForLoadState: Test ended.
at pages/operational-studies/scenario-timetable-section.ts:157
155 | // Verify that simulation results are displayed
156 | async verifySimulationResultsVisibility(): Promise<void> {
> 157 | await this.page.waitForLoadState('networkidle', { timeout: SIMULATION_RESULT_TIMEOUT });
| ^
158 |
159 | const simulationResultsLocators = [
160 | // TODO: remove this commented code when the design of simulation bar has been changed
at ScenarioTimetableSection.verifySimulationResultsVisibility (/app/front/tests/pages/operational-studies/scenario-timetable-section.ts:157:21)
at ScenarioTimetableSection.verifyEachTrainSimulation (/app/front/tests/pages/operational-studies/scenario-timetable-section.ts:363:18)
at /app/front/tests/008-train-schedule.spec.ts:92:5
|
[chromium] › 008-train-schedule.spec.ts:82:3 › Verify train schedule elements and filters › Loading trains and verifying simulation result:
tests/logging-fixture.ts#L21
1) [chromium] › 008-train-schedule.spec.ts:82:3 › Verify train schedule elements and filters › Loading trains and verifying simulation result
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Test failed due to uncaught exception: "TypeError: Cannot read properties of undefined (reading 'values')"
at logging-fixture.ts:21
19 | // Handle uncaught exceptions
20 | page.on('pageerror', (exception) => {
> 21 | throw new Error(`Test failed due to uncaught exception: "${exception}"`);
| ^
22 | });
23 |
24 | // Run the actual test
at Page.<anonymous> (/app/front/tests/logging-fixture.ts:21:13)
|
[chromium] › 008-train-schedule.spec.ts:82:3 › Verify train schedule elements and filters › Loading trains and verifying simulation result:
tests/pages/operational-studies/scenario-timetable-section.ts#L362
1) [chromium] › 008-train-schedule.spec.ts:82:3 › Verify train schedule elements and filters › Loading trains and verifying simulation result
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: locator.click: Test ended.
Call log:
- waiting for getByTestId('scenario-timetable-train').nth(12).getByTestId('scenario-timetable-train-button')
- locator resolved to <div tabindex="0" role="button" class="w-full clickab…>…</div>
- attempting click action
- waiting for element to be visible, enabled and stable
at pages/operational-studies/scenario-timetable-section.ts:362
360 | this.timetableTrains.nth(currentTrainIndex)
361 | );
> 362 | await trainButton.click({ position: { x: 5, y: 5 } });
| ^
363 | await this.verifySimulationResultsVisibility();
364 | }
365 | }
at ScenarioTimetableSection.verifyEachTrainSimulation (/app/front/tests/pages/operational-studies/scenario-timetable-section.ts:362:25)
at /app/front/tests/008-train-schedule.spec.ts:92:5
|
[chromium] › 006-stdcm.spec.ts:120:3 › Verify stdcm simulation page › Launch simulation with and without capacity for towed rolling stock:
tests/pages/stdcm/stdcm-page.ts#L132
2) [chromium] › 006-stdcm.spec.ts:120:3 › Verify stdcm simulation page › Launch simulation with and without capacity for towed rolling stock
TimeoutError: locator.waitFor: Timeout 30000ms exceeded.
Call log:
- waiting for getByTestId('simulation-status') to be visible
at pages/stdcm/stdcm-page.ts:132
130 | await this.launchSimulationButton.click({ force: true });
131 | // Wait for simulation message "Calculation completed"
> 132 | await this.simulationStatus.waitFor({ timeout: STDCM_SIMULATION_TIMEOUT });
| ^
133 | }
134 |
135 | async mapMarkerVisibility() {
at STDCMPage.launchSimulation (/app/front/tests/pages/stdcm/stdcm-page.ts:132:33)
at /app/front/tests/006-stdcm.spec.ts:140:5
|
End to end tests
Process completed with exit code 1.
|
Slow Test:
[chromium] › 009-rolling-stock-editor.spec.ts#L1
[chromium] › 009-rolling-stock-editor.spec.ts took 34.1s
|
Slow Test:
[chromium] › 014-stdcm-linked-train.spec.ts#L1
[chromium] › 014-stdcm-linked-train.spec.ts took 33.3s
|
Slow Test:
[chromium] › 013-stdcm-simulation-sheet.spec.ts#L1
[chromium] › 013-stdcm-simulation-sheet.spec.ts took 27.8s
|
🎭 Playwright Run Summary
1 failed
[chromium] › 008-train-schedule.spec.ts:82:3 › Verify train schedule elements and filters › Loading trains and verifying simulation result
1 flaky
[chromium] › 006-stdcm.spec.ts:120:3 › Verify stdcm simulation page › Launch simulation with and without capacity for towed rolling stock
42 passed (4.9m)
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
e2e-container-logs
|
179 KB |
|
e2e-traces-and-videos
|
18.2 MB |
|
integration-container-logs
|
37.5 KB |
|