test(ui): create a report through the wizard, and cover more report shapes - #260
Merged
Conversation
…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.
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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_runwalks 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:
ColumnTyperound-trips into the CSV.xlsxopens as a package and has the right row countcsv+xlsxzip bundleThe xlsx assertion is deliberately about rows, not parts. Both
xl/workbook.xmland 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 theChoose formatsheading renders before the cards do — the first render shows the "no formats registered" empty state. Probing withCountAsync()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
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 treatsCancelledas terminal so a cancelled job reports itself rather than burning the full 30s and claiming a timeout.Properties/launchSettings.jsonis gitignored for this project — it is never launched, only hosted in-process.