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
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ export default function CaseActionBar({
<>
<Button
size="small"
variant="outlined"
variant="contained"
color="primary"
endIcon={<ChevronDown size={16} />}
onClick={(e) => setStateMenuAnchor(e.currentTarget)}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@ describe("CaseActivitiesFeed", () => {
);

expect(screen.getByText("State:")).toBeInTheDocument();
// The line reads "State: Resolved was In Progress" across sibling text
// nodes (new value, then the struck-through old value in its own span) —
// assert on the row's combined text rather than a single text node.
expect(container.textContent).toContain("Resolved");
expect(container.textContent).toContain("was");
// The line reads "State: In Progress → Resolved" across sibling text nodes
// (muted old value, arrow, then new value) — assert on combined row text.
expect(container.textContent).toContain("In Progress");
expect(container.textContent).toContain("→");
expect(container.textContent).toContain("Resolved");
expect(screen.getByText(/Jane Doe/)).toBeInTheDocument();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function formatChangeValue(value: string | undefined): string | undefined {
return formatAbsoluteForUser(value) ?? value;
}

/** One "<label>: <new> was <old>" line for a field-change entry's audit strip. */
/** One "<label>: <old> → <new>" line for a field-change entry's audit strip. */
function FieldChangeLine({
field,
}: {
Expand All @@ -108,22 +108,15 @@ function FieldChangeLine({
return (
<Typography variant="body2" component="div">
<strong>{field.fieldLabel}:</strong>{" "}
{hasNew ? formatChangeValue(field.newValue) : <em>cleared</em>}
{hadPrevious && (
<>
{" "}
was{" "}
<Box
component="span"
sx={{
textDecoration: "line-through",
color: "text.secondary",
}}
>
<Box component="span" sx={{ color: "text.secondary" }}>
{formatChangeValue(field.previousValue)}
</Box>
{" → "}
</>
)}
{hasNew ? formatChangeValue(field.newValue) : <em>cleared</em>}
</Typography>
);
}
Expand Down