tests: fix flaky test with hardcoded ID #13796
build.yml
on: pull_request
Matrix: build
check_generated_railjson_sync
25s
check_railjson_generator
1m 52s
check_commits
10s
Check final newline
8s
check_integration_tests
1m 21s
check_osrd_schema
38s
check_toml
8s
check_infra_schema_sync
24s
check_reuse_compliance
8s
check_front_rtk_sync
1m 35s
check_core
4m 44s
check_editoast_tests
6m 53s
check_editoast_lints
8m 53s
check_editoast_openapi
1m 5s
check_gateway
3m 16s
check_osrdyne
3m 42s
check_front
2m 26s
integration_tests
10m 28s
Annotations
5 errors, 13 warnings, and 1 notice
[chromium] › 004-scenario-management.spec.ts:21:7 › Test if scenario creation workflow is working properly › Create a new scenario:
tests/utils/scenario.ts#L29
1) [chromium] › 004-scenario-management.spec.ts:21:7 › Test if scenario creation workflow is working properly › Create a new scenario
TypeError: Cannot read properties of undefined (reading 'id')
at utils/scenario.ts:29
27 | // Create a new scenario with a unique name
28 | const scenario = await postApiRequest(
> 29 | `/api/projects/${project.id}/studies/${study.id}/scenarios/`,
| ^
30 | {
31 | ...scenarioData,
32 | name: `${scenarioData.name} ${uuidv4()}`,
at setupScenario (/app/tests/utils/scenario.ts:29:50)
at /app/tests/004-scenario-management.spec.ts:17:35
|
[firefox] › 001-home-page.spec.ts:22:7 › Home page OSRD › should display links in the home page:
tests/pages/home-page-model.ts#L79
2) [firefox] › 001-home-page.spec.ts:22:7 › Home page OSRD › should display links in the home page
Error: expect(locator).toHaveText(expected)
Locator: locator('h5')
- Expected - 5
+ Received + 5
Array [
- "Études d'exploitation",
- "Sillons de dernière minute",
- "Éditeur d'infrastructure",
- "Éditeur de matériel roulant",
- "Cartographie",
+ "operationalStudies",
+ "stdcm",
+ "editor",
+ "rollingStockEditor",
+ "map",
]
Call log:
- expect.toHaveText with timeout 10000ms
- waiting for locator('h5')
- locator resolved to 5 elements
- locator resolved to 5 elements
at pages/home-page-model.ts:79
77 | // Assert that the expected links are displayed on the page
78 | async getDisplayLinks() {
> 79 | expect(this.getLinks).toHaveText([
| ^
80 | this.getTranslations('operationalStudies'),
81 | this.getTranslations('stdcm'),
82 | this.getTranslations('editor'),
at HomePage.getDisplayLinks (/app/tests/pages/home-page-model.ts:79:27)
at /app/tests/001-home-page.spec.ts:23:20
|
[firefox] › 004-scenario-management.spec.ts:21:7 › Test if scenario creation workflow is working properly › Create a new scenario:
tests/utils/scenario.ts#L29
3) [firefox] › 004-scenario-management.spec.ts:21:7 › Test if scenario creation workflow is working properly › Create a new scenario
TypeError: Cannot read properties of undefined (reading 'id')
at utils/scenario.ts:29
27 | // Create a new scenario with a unique name
28 | const scenario = await postApiRequest(
> 29 | `/api/projects/${project.id}/studies/${study.id}/scenarios/`,
| ^
30 | {
31 | ...scenarioData,
32 | name: `${scenarioData.name} ${uuidv4()}`,
at setupScenario (/app/tests/utils/scenario.ts:29:50)
at /app/tests/004-scenario-management.spec.ts:17:35
|
[webkit] › 004-scenario-management.spec.ts:21:7 › Test if scenario creation workflow is working properly › Create a new scenario:
tests/utils/scenario.ts#L29
4) [webkit] › 004-scenario-management.spec.ts:21:7 › Test if scenario creation workflow is working properly › Create a new scenario
TypeError: Cannot read properties of undefined (reading 'id')
at utils/scenario.ts:29
27 | // Create a new scenario with a unique name
28 | const scenario = await postApiRequest(
> 29 | `/api/projects/${project.id}/studies/${study.id}/scenarios/`,
| ^
30 | {
31 | ...scenarioData,
32 | name: `${scenarioData.name} ${uuidv4()}`,
at setupScenario (/app/tests/utils/scenario.ts:29:50)
at /app/tests/004-scenario-management.spec.ts:17:35
|
[webkit] › 004-scenario-management.spec.ts:21:7 › Test if scenario creation workflow is working properly › Create a new scenario:
tests/utils/scenario.ts#L29
4) [webkit] › 004-scenario-management.spec.ts:21:7 › Test if scenario creation workflow is working properly › Create a new scenario
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
TypeError: Cannot read properties of undefined (reading 'id')
at utils/scenario.ts:29
27 | // Create a new scenario with a unique name
28 | const scenario = await postApiRequest(
> 29 | `/api/projects/${project.id}/studies/${study.id}/scenarios/`,
| ^
30 | {
31 | ...scenarioData,
32 | name: `${scenarioData.name} ${uuidv4()}`,
at setupScenario (/app/tests/utils/scenario.ts:29:50)
at /app/tests/004-scenario-management.spec.ts:17:35
|
build (front-build, front-tests, front-devel, front-nginx)
The following actions use a deprecated Node.js version and will be forced to run on node20: docker/login-action@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
build (core-build, core)
The following actions use a deprecated Node.js version and will be forced to run on node20: docker/login-action@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
build (osrdyne, osrdyne-test)
The following actions use a deprecated Node.js version and will be forced to run on node20: docker/login-action@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
build (editoast, editoast-test)
The following actions use a deprecated Node.js version and will be forced to run on node20: docker/login-action@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
build (gateway-test, gateway-standalone, gateway-front)
The following actions use a deprecated Node.js version and will be forced to run on node20: docker/login-action@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
check_railjson_generator
The following actions use a deprecated Node.js version and will be forced to run on node20: codecov/codecov-action@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
check_front
The following actions use a deprecated Node.js version and will be forced to run on node20: codecov/codecov-action@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
check_gateway
The following actions use a deprecated Node.js version and will be forced to run on node20: codecov/codecov-action@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
check_osrdyne
The following actions use a deprecated Node.js version and will be forced to run on node20: codecov/codecov-action@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
check_core
The following actions use a deprecated Node.js version and will be forced to run on node20: codecov/codecov-action@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
check_editoast_tests
The following actions use a deprecated Node.js version and will be forced to run on node20: codecov/codecov-action@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
integration_tests
The following actions use a deprecated Node.js version and will be forced to run on node20: codecov/codecov-action@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Slow Test:
[chromium] › 009-rollingstock-editor.spec.ts#L1
[chromium] › 009-rollingstock-editor.spec.ts took 31.7s
|
🎭 Playwright Run Summary
4 flaky
[chromium] › 004-scenario-management.spec.ts:21:7 › Test if scenario creation workflow is working properly › Create a new scenario
[firefox] › 001-home-page.spec.ts:22:7 › Home page OSRD › should display links in the home page
[firefox] › 004-scenario-management.spec.ts:21:7 › Test if scenario creation workflow is working properly › Create a new scenario
[webkit] › 004-scenario-management.spec.ts:21:7 › Test if scenario creation workflow is working properly › Create a new scenario
7 skipped
93 passed (7.8m)
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
integration-container-logs
Expired
|
303 KB |
|
integration-videos
Expired
|
6.48 MB |
|