fix(design): claim audit part 1 — a closing key no longer re-presses its trigger, the Switch box and name, named z-levels (E28)
- In-place editors (Playlists heading + rail rename, Plex collection + playlist rename, PriorityStepper, Scheduler interval): a real Enter closed the editor, returned the focus to the trigger, and the same keystroke's activation pressed that trigger again - re-opening the editor, or in the rail selecting the renamed playlist. useReturnFocus.arm(e) now cancels the key's default (type-enforced); the rail and Scheduler editors do the same. The earlier tests dispatched a synthetic keydown, which has no default. - Plex playlist rename: an unchanged or empty title closes with no write, as the collection rename does. - Switch: a 36x24 box around the track (the 24 floor), 44 on a coarse pointer; `label` is required, and the Plex two-way-sync switch had no name. - z-index: numeric z-10/z-20 and a literal 40 moved onto the named layer scale; a lint rule + contract. - The /watch file card's Download is the filled primary: the page's one action. - Stale comments: the 1024x768 floor, the retired glass tuner.
This commit is contained in:
@@ -165,6 +165,16 @@ describe("Scheduler · the job interval editor", () => {
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
// E28 audit: a real Enter re-opened the editor — the keystroke's own activation landed on the trigger
|
||||
// the focus had just returned to. The closing keys cancel their default action.
|
||||
it("closing by a key does not press the trigger again", async () => {
|
||||
await mount();
|
||||
for (const key of ["Enter", "Escape"]) {
|
||||
fireEvent.click(screen.getByRole("button", { name: /scheduler.everyMin/ }));
|
||||
expect(fireEvent.keyDown(intervalBox()!, { key })).toBe(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("Scheduler · the maintenance batch editor", () => {
|
||||
|
||||
Reference in New Issue
Block a user