generated from coulomb/repo-seed
CE-WP-0006/0007: Capture view polish, workplans, and UX refinements
- Blob URL stability, scroll centre, strip-only visual guide - Focus-gated linking, unlink clears overlay, field badge tooltips - Capture layout (viewer centre), grey guide lines, Add field button - Workplans CE-WP-0006 (done) and CE-WP-0007 (T01-T09 done, T10-T12 todo) - Integration tests and viewer-url helpers
This commit is contained in:
@@ -128,25 +128,25 @@ describe("FormsApp — active-evidence cycling (CE-WP-0003-T06)", () => {
|
||||
[{ type: "TextQuoteSelector", exact: FIXTURE.known_good_quote }],
|
||||
);
|
||||
});
|
||||
const textarea = screen.getByPlaceholderText(/Add a one-line comment/);
|
||||
await user.type(textarea, "Form-cycling test evidence");
|
||||
await user.click(screen.getByRole("button", { name: /Save evidence/ }));
|
||||
await user.type(
|
||||
screen.getByTestId("inline-capture-commentary"),
|
||||
"Form-cycling test evidence",
|
||||
);
|
||||
await user.click(screen.getByTestId("inline-capture-save"));
|
||||
await screen.findByText(/Form-cycling test evidence/);
|
||||
|
||||
// --- Switch to Forms mode.
|
||||
await user.click(screen.getByRole("button", { name: "Forms" }));
|
||||
await user.click(screen.getByRole("button", { name: "Capture" }));
|
||||
|
||||
// The evidence should appear in the Forms strip too (it queries by doc).
|
||||
const stripCard = await screen.findByRole("button", {
|
||||
name: /Form-cycling test evidence/,
|
||||
});
|
||||
|
||||
// Stage it.
|
||||
await user.click(stripCard);
|
||||
|
||||
// Click the Summary field → link gets created.
|
||||
// Focus Summary, then click strip card → link gets created.
|
||||
const summaryField = screen.getByLabelText("Summary of the matter");
|
||||
await user.click(summaryField);
|
||||
await user.click(stripCard);
|
||||
|
||||
// Link chip on Summary now shows "1 evidence"
|
||||
await waitFor(
|
||||
@@ -170,12 +170,13 @@ describe("FormsApp — active-evidence cycling (CE-WP-0003-T06)", () => {
|
||||
await user.click(screen.getByLabelText("Disputed amount"));
|
||||
await user.click(summaryField);
|
||||
|
||||
// The chip rendered inside the form pane has aria-current="true".
|
||||
// The strip card for the linked evidence has aria-current="true".
|
||||
await waitFor(() => {
|
||||
const chip = document.querySelector(
|
||||
'[data-evidence-id][aria-current="true"]',
|
||||
const card = document.querySelector(
|
||||
'button[aria-current="true"]',
|
||||
);
|
||||
expect(chip).not.toBeNull();
|
||||
expect(card).not.toBeNull();
|
||||
expect(card!.textContent).toMatch(/Form-cycling test evidence/);
|
||||
});
|
||||
|
||||
// The viewer was asked to scroll to the underlying annotation.
|
||||
|
||||
Reference in New Issue
Block a user