Repository navigation
test(agent): pin the newtab scheduled results panel contract - ScheduleResults - #2031
Merged
Merged
Conversation
…leResults Hold the one export of entrypoints/newtab/index/ScheduleResults.tsx against its contract (#1580), appended to the store suite by the readdir rule: the panel imports this suite's subject through its two hooks, and the hooks answer empty arrays in a static render, so the block pins what is statically reachable - the panel stays entirely away while no run has loaded - plus the ordering (running before finished, newest first), the display cap of three, the cancel/retry gating behind their aria-labels, the measured status icon set, the header title with its running badge and view-more anchor, the default-open collapsed flag and the run result dialog wiring as source checks. The render helper lends the panel a not-collapsed localStorage flag for one render, this group having no localStorage at all. Closes #1580 Dmitrii Fedorov ([@dmitrii-f-t27](https://github.com/dmitrii-f-t27))
Summary by t27-beesThis PR adds contract tests for the Worth a look
Read: 1 files, +129 -0, the whole diff. Head |
✅ Tests passed — 3876/3946
|
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.
Summary
Hold the one export of
trios/agent-server/apps/agent/entrypoints/newtab/index/ScheduleResults.tsx—ScheduleResults— against its contract (#1580), so the next change to that file has something to fail against.The block is appended to
lib/schedules/scheduleStorage.test.tsby the readdir rule this file already documents for the #1634 block: the panel imports this suite's subject (the store) through its two hooks, and the hooks answer empty arrays in a static render — they populate through effects a static render never runs — while a store mock registered anywhere cannot replace the module this file already materialized real.What is pinned:
localStorageflag for the duration of one render, this group having nolocalStorageat all (measured: bun-test globals leave it undefined) and the subject reading the collapsed flag inside its firstuseStateinitializer;/app.html#/scheduled, theschedule-results-collapsedflag with its default-open read, and the run result dialog wired with the viewed run and both handlers.Verification
bun test lib/schedules/scheduleStorage.test.ts— 37 pass, 0 fail (5 new tests).git checkout.lib/schedules/,entrypoints/app/scheduled-tasks/,entrypoints/newtab/): 49 pass, 0 fail across 8 files.biome cion the suite file: clean.tsgo --noEmit: 0 mentions of the suite file.Closes #1580
Dmitrii Fedorov (@dmitrii-f-t27)