Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/coverage-acks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,11 @@ coverage-ack: frontend/tests/QuestionFeed.spec.ts::question feed - Level 2 (cand
# the same underlying hard constraint (chips must never occlude the reference card) against the
# new mechanism instead of the retired one.
coverage-ack: frontend/tests/QuestionFeedResponsive.spec.ts::question feed - Level 2 layout containment (real-device regression guard) > at 360px with the attribute-chip filter expanded, the ring collapses to a stack instead of squeezing the card — dropped: the ring-around-card composition (CardArea) it guarded is retired by issue #707 (chips render in QPanel now, never sharing a box with the card); replaced by "at 360px with the attribute-chip filter shown, the chips never overlap the pinned reference card" covering the same never-occlude constraint against the new mechanism.
coverage-ack: frontend/tests/QuestionFeedResponsive.spec.ts::question feed - tap target sizes (mobile funnel pass) > Level 1's stacked answer buttons meet the 44px floor — the fixed Level 1/2/3 ladder was removed by the #728 de-hardcoding; this flow no longer exists
coverage-ack: frontend/tests/QuestionFeedResponsive.spec.ts::question feed - hover-zoom is not clipped by its frame (issue #705) > the Level 1 reference thumbnail's frame stops clipping while hovered — the fixed Level 1/2/3 ladder was removed by the #728 de-hardcoding; this flow no longer exists
coverage-ack: frontend/tests/QuestionFeedResponsive.spec.ts::question feed - Level 1 answer-row hierarchy (issue #711) > the Yes button sizes to its content instead of spanning full width (issue #740) — the fixed Level 1/2/3 ladder was removed by the #728 de-hardcoding; this flow no longer exists
coverage-ack: frontend/tests/QuestionFeedResponsive.spec.ts::question feed - Level 1 answer-row hierarchy (issue #711) > the Yes button reads at the same font size as its 'Not sure' sibling — the fixed Level 1/2/3 ladder was removed by the #728 de-hardcoding; this flow no longer exists
coverage-ack: frontend/tests/QuestionFeed.spec.ts::question feed - confirm_suggestion question type > lands on Level 1 - a single suggested printing, no grid - and shows the 'Is it this one?' prompt — the fixed Level 1/2/3 ladder was removed by the #728 de-hardcoding; suggestion and grid now render on a single page
coverage-ack: frontend/tests/QuestionFeed.spec.ts::question feed - confirm_suggestion question type > YES confirms the suggested printing directly, without visiting the grid — the fixed Level 1/2/3 ladder was removed by the #728 de-hardcoding; the grid now coexists with the suggestion on the same page
coverage-ack: frontend/tests/QuestionFeed.spec.ts::question feed - confirm_suggestion question type > NOT SURE drops to Level 2's candidate grid without casting a printing vote, but does POST an abstention — the fixed Level 1/2/3 ladder was removed by the #728 de-hardcoding; the grid now coexists with the suggestion on the same page
coverage-ack: frontend/tests/QuestionFeed.spec.ts::question feed - confirm_suggestion question type > NO drops to Level 2's candidate grid, excluding the rejected suggestion, without casting a vote — the fixed Level 1/2/3 ladder was removed by the #728 de-hardcoding; the grid now coexists with the suggestion on the same page
39 changes: 29 additions & 10 deletions frontend/src/features/questionFeed/QuestionFeed.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ describe("QuestionFeed", () => {
).toHaveTextContent("Suggested match");
});

it("shows the suggested printing's own reference image on Level 1 (regression: dropped when Level 1 was introduced in #49)", async () => {
it("shows the suggested printing's own reference image on the suggested-match question (regression: dropped when the suggestion slot was introduced in #49)", async () => {
server.use(
http.get(buildRoute("2/questionFeed/"), () =>
HttpResponse.json(
Expand All @@ -410,7 +410,7 @@ describe("QuestionFeed", () => {
await revealCard();

const referenceImage = within(
await screen.findByTestId("question-feed-level1-reference-image")
await screen.findByTestId("question-feed-suggestion-reference-image")
).getByRole("img");
expect(referenceImage).toHaveAttribute(
"src",
Expand Down Expand Up @@ -1056,8 +1056,28 @@ describe("QuestionFeed", () => {
);
}

it("tapping Level 1 'Not sure' POSTs an abstention for this card and question type, then advances to Level 2", async () => {
server.use(serveConfirmSuggestionOnce());
it("tapping the suggested-match 'Not sure' POSTs an abstention for this card and question type, then advances to the next question", async () => {
// The de-laddered flow (issue #728): "Not sure" means "I can't resolve this" - it
// records the abstention (issue #712) and advances to the next question rather than
// falling into a level1 -> level2 re-ask of the same candidates.
let feedFetchCount = 0;
server.use(
http.get(buildRoute("2/questionFeed/"), () => {
feedFetchCount += 1;
return HttpResponse.json(
{
item: confirmSuggestionItem,
remainingEstimate: {
total: 1,
confirmable: 1,
contested: 0,
fresh: 0,
},
},
{ status: 200 }
);
})
);
let abstentionBody: Record<string, unknown> | undefined;
server.use(
http.post(
Expand All @@ -1072,20 +1092,19 @@ describe("QuestionFeed", () => {
await revealCard();

fireEvent.click(
await screen.findByTestId("question-feed-level1-not-sure")
await screen.findByTestId("question-feed-suggestion-not-sure")
);

await waitFor(() => expect(abstentionBody).toBeDefined());
expect(abstentionBody).toMatchObject({
identifier: confirmSuggestionItem.card.identifier,
questionType: "confirm_suggestion",
});
expect(
await screen.findByTestId("question-feed-level2")
).toBeInTheDocument();
// advances to the next question - no level2 re-ask of the same candidates
await waitFor(() => expect(feedFetchCount).toBe(2));
});

it("tapping Level 1 'Skip' never calls submitQuestionAbstention", async () => {
it("tapping 'Skip' never calls submitQuestionAbstention", async () => {
server.use(serveConfirmSuggestionOnce());
let abstentionCalls = 0;
server.use(
Expand All @@ -1097,7 +1116,7 @@ describe("QuestionFeed", () => {
renderFeed();
await revealCard();

fireEvent.click(await screen.findByTestId("question-feed-level1-skip"));
fireEvent.click(await screen.findByTestId("question-feed-skip"));
await revealCard();

expect(abstentionCalls).toBe(0);
Expand Down
Loading