feat(FN-3755): reorder task detail timestamps
Reorders timestamps in the task detail modal and adds a rendering test for the component, with a pnpm-lock bump. Fusion-Task-Id: FN-3755
This commit is contained in:
@@ -156,6 +156,11 @@
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.detail-timestamps {
|
||||
color: var(--text-dim);
|
||||
margin-top: var(--space-xs);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.detail-provenance {
|
||||
align-items: flex-start;
|
||||
|
||||
@@ -1860,8 +1860,6 @@ export function TaskDetailContent({
|
||||
);
|
||||
})()}
|
||||
<div className="detail-meta">
|
||||
Created {new Date(task.createdAt).toLocaleDateString()} · Updated{" "}
|
||||
{new Date(task.updatedAt).toLocaleDateString()} ·
|
||||
<label
|
||||
className={`card-priority-badge card-priority-badge--${inlinePriority} detail-priority-chip ${isSavingInlinePriority ? "detail-priority-chip--saving" : ""}`}
|
||||
>
|
||||
@@ -1953,6 +1951,10 @@ export function TaskDetailContent({
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
<div className="detail-timestamps">
|
||||
Created {new Date(task.createdAt).toLocaleDateString()} · Updated{" "}
|
||||
{new Date(task.updatedAt).toLocaleDateString()}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -141,6 +141,27 @@ describe("TaskDetailModal", () => {
|
||||
|
||||
expect(screen.queryByText(/Created via/)).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("FN-3755 renders provenance before created-updated timestamps", () => {
|
||||
const { container } = render(
|
||||
<TaskDetailModal
|
||||
task={makeTask({ sourceType: "dashboard_ui" })}
|
||||
onClose={noop}
|
||||
onMoveTask={noopMove}
|
||||
onDeleteTask={noopDelete}
|
||||
onMergeTask={noopMerge}
|
||||
onOpenDetail={noopOpenDetail}
|
||||
addToast={noop}
|
||||
/>,
|
||||
);
|
||||
|
||||
const provenance = screen.getByText("Created via Dashboard").closest(".detail-provenance");
|
||||
const timestamps = container.querySelector(".detail-timestamps");
|
||||
|
||||
expect(provenance).toBeTruthy();
|
||||
expect(timestamps).toBeTruthy();
|
||||
expect(provenance?.compareDocumentPosition(timestamps as Node) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
it("renders modal wrapper structure and default close control", () => {
|
||||
|
||||
Reference in New Issue
Block a user