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 @@ -280,6 +280,50 @@ describe('project shell — All projects Tasks mode', () => {
// An archived project said so only in the Projects list. Every one of its tabs
// now carries the badge, beside the breadcrumb leaf.
describe('project shell — archived badge', () => {
it.each(['board', 'list'])(
'keeps the aggregate %s unbadged when the path project is archived live or on a fresh mount',
(view) => {
mockLocation.pathname = `/dashboard/org-1/projects/proj-1/tasks/${view}`;
mockLocation.search = { projects: 'all' };
const { rerender, unmount } = setup([]);

expect(
screen.queryByText('projects.archived.badge'),
).not.toBeInTheDocument();

mockUseProject.mockReturnValue({
project: { _id: 'proj-1', name: 'Apollo', archivedAt: 1789000000000 },
isLoading: false,
});
rerender(<ProjectDetailLayout />);
expect(
screen.queryByText('projects.archived.badge'),
).not.toBeInTheDocument();
expect(
screen.getByRole('link', { name: 'tasks.title' }),
).toBeInTheDocument();

unmount();
setup([], { archivedAt: 1789000000000 });
expect(
screen.queryByText('projects.archived.badge'),
).not.toBeInTheDocument();
expect(
screen.getByRole('link', { name: 'tasks.title' }),
).toBeInTheDocument();
},
);

it.each(['board', 'list'])(
'keeps the archived badge on a single-project %s',
(view) => {
mockLocation.pathname = `/dashboard/org-1/projects/proj-1/tasks/${view}`;
setup([], { archivedAt: 1789000000000 });

expect(screen.getByText('projects.archived.badge')).toBeInTheDocument();
},
);

it('badges the breadcrumb when the project is archived', () => {
setup([], { archivedAt: 1789000000000 });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,10 @@ function ProjectDetailLayout() {
projectId={asProjectId(projectId)}
projectName={project.name}
/>
{project.archivedAt !== undefined && (
<ProjectArchivedBadge className="shrink-0 px-1.5 py-px text-[10px]" />
)}
{!allProjectsMode &&
project.archivedAt !== undefined && (
<ProjectArchivedBadge className="shrink-0 px-1.5 py-px text-[10px]" />
)}
</span>
) : (
<SkeletonBox>
Expand Down
6 changes: 6 additions & 0 deletions services/platform/tests/manual/reference/automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ One row per case group, carried over from the per-suite coverage tables the
guides used to hold. **Don't** re-verify an automated row by hand: a red there
is a spec failure and belongs in the gate, not in a round.

The All projects board and list never badge the archived project retained in
the URL. `app/routes/dashboard/$id/projects/$projectId.test.tsx` covers a live
archive update, a fresh mount with an archived path project (reload state), and
the archived badge retained on single-project board/list pages. Real-browser
reloads and cross-session archive delivery remain manual.

Legend: ✅ fully automated · 🔶 partially automated · ⛔ manual-only (no spec).

| Suite | Boxes | Status | Owning spec |
Expand Down