Skip to content

test(ui): create a report through the wizard, and cover more report shapes - #260

Merged
thiagoluga merged 1 commit into
masterfrom
test/webui-e2e-wizard-save
Aug 5, 2026
Merged

test(ui): create a report through the wizard, and cover more report shapes#260
thiagoluga merged 1 commit into
masterfrom
test/webui-e2e-wizard-save

Conversation

@thiagoluga

Copy link
Copy Markdown
Owner

Closes the gap the E2E suite shipped with, and broadens it from "the app works" to "these report shapes deliver the right bytes". 24 tests, ~58s, stable across three consecutive runs.

1. The wizard now creates a report for real

A_report_created_through_the_wizard_is_registered_and_can_be_run walks all five steps in the browser — source type → name and columns → formats → destination → Save — then checks the engine's own API that the report exists with the shape the wizard collected, and runs it to a downloadable file.

Saving through the UI and having the engine agree is exactly what the component-level (bUnit) suite cannot reach.

2. Six report shapes, asserting the delivered bytes

Not "the job said Completed" — a run can report success and still deliver a truncated or empty file:

Scenario What would break it
Every ColumnType round-trips into the CSV a type the writer mishandles leaves a gap
250 rows at 10/page (25 real batches) a dropped or duplicated page (count + uniqueness)
Zero-row report a writer that emits nothing instead of a header
.xlsx opens as a package and has the right row count see note below
Report with no destination asserted to have none, and still yields an artifact
csv+xlsx zip bundle the two files disagreeing on row count

The xlsx assertion is deliberately about rows, not parts. Both xl/workbook.xml and the sheet part are written before any data arrives, so a test that only checks they exist stays green on a run that wrote zero rows. That was a real weakness in the first draft of this file, caught in review.

3. One real race fixed while writing this

The format step fetches the engine's capabilities inside OnInitializedAsync, so the Choose formats heading renders before the cards do — the first render shows the "no formats registered" empty state. Probing with CountAsync() at that moment silently skipped every toggle, left the wizard's defaults (csv+xlsx) in place, and failed later as a format-selection assertion that had nothing to do with selection. Now it waits for the cards.

Housekeeping

  • The API calls move into a shared ReportApi, replacing three copies of the same poll loop. It polls the job id the run endpoint returns (exact) instead of searching by name, and treats Cancelled as terminal so a cancelled job reports itself rather than burning the full 30s and claiming a timeout.
  • The Web SDK's generated Properties/launchSettings.json is gitignored for this project — it is never launched, only hosted in-process.

…hapes

Closes the gap the E2E suite shipped with: a report is now created entirely
through the Builder wizard in the browser — source type, name and columns,
formats, destination, Save — and then verified against the engine's API and run
to a downloadable file. Saving through the UI and having the engine agree is the
part component tests cannot reach.

Adds six report shapes, each asserting the bytes that came out rather than only
that the job completed — a run can report success and still deliver a truncated
or empty file:

- every ColumnType the source and writers branch on round-trips into the CSV;
- 250 rows at 10 per page (25 real batches) arrive complete and without
  duplicates, which is the pagination loop actually working;
- a zero-row report still yields a well-formed header-only file;
- an .xlsx opens as a valid package AND carries the expected row count — both
  the workbook and sheet parts are written before any data arrives, so asserting
  they merely exist would pass on a run that wrote nothing;
- a report with no destination is registered with none and still produces a
  downloadable artifact;
- a csv+xlsx report downloads as a zip whose two files agree on the row count,
  which is where a multi-output write path losing data on one branch would show.

The API calls behind these move into a shared ReportApi client, replacing three
copies of the same poll loop. It polls the job id the run endpoint returns rather
than searching by report name, and treats Cancelled as terminal so a cancelled
job reports itself instead of timing out.

One real race fixed while writing this: the format step fetches the engine's
capabilities inside OnInitializedAsync, so the heading renders before the cards.
Probing with CountAsync() before that second render silently skipped every toggle
and left the wizard's defaults, failing later as a format-selection assertion
that had nothing to do with selection.
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

@thiagoluga
thiagoluga merged commit ae29442 into master Aug 5, 2026
5 checks passed
@thiagoluga
thiagoluga deleted the test/webui-e2e-wizard-save branch August 5, 2026 07:24
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.

1 participant