Skip to content

fix(tests): wait for chart image upload before reloading in e2e tests - #1177

Merged
ThibaudDauce merged 1 commit into
mainfrom
fix/e2e-chart-image-upload-race
Jul 30, 2026
Merged

fix(tests): wait for chart image upload before reloading in e2e tests#1177
ThibaudDauce merged 1 commit into
mainfrom
fix/e2e-chart-image-upload-race

Conversation

@Samuelfaure

@Samuelfaure Samuelfaure commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • e2e (chromium, 2) has been intermittently failing on main since 2026-07-23 on tests/visualizations/chart-configurator.spec.ts"x-axis dropdown should show columns from all chart resources after loading", with Failed to save chart: FetchError ... POST .../image/ <no response>.
  • Root cause: feat(visualizations): save image on save #1111 made saveChart() upload a chart preview image (POST /api/1/visualizations/{id}/image/) after the visualization-creation POST resolves, but two tests only awaited that first POST before calling page.reload(). Under CI load the image upload is sometimes still in flight, so the reload aborts it and the resulting console error trips the assertNoConsoleErrors fixture.
  • Fix: also wait for the /image/ upload POST to resolve before reloading, in both affected tests.

Test plan

  • pnpm exec eslint tests/visualizations/chart-configurator.spec.ts passes
  • pnpm run typecheck passes
  • CI e2e (chromium, 2) passes (this is what we're fixing — watch this run)

saveChart() uploads the chart preview image after the visualization
POST resolves. Two tests only awaited the visualization POST before
calling page.reload(), which could abort the still in-flight image
upload and fail assertNoConsoleErrors with a fetch error.
@ThibaudDauce
ThibaudDauce merged commit 5481fb0 into main Jul 30, 2026
11 checks passed
@Samuelfaure
Samuelfaure deleted the fix/e2e-chart-image-upload-race branch July 31, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants