fix(features): address Task 3 code review feedback

- Add navItemFactory to navigation (spec §5.1 — was missing)
- Refactor blog/router.test.ts to use articleFactory (eliminate new Date())
- headerFactory uses sequence for logoId (deterministic buildList output)
- Align media/tsconfig.json with other features (jsx + tests/ include)
- Refactor auth/container.test.ts to use userFactory

Reviewer: superpowers:code-reviewer (Task 3 of Plan 7).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-05 15:18:35 +02:00
parent 53c2fbb9e1
commit a74f217703
8 changed files with 57 additions and 19 deletions

View File

@@ -6,6 +6,7 @@ import { MockUsersRepository } from "@/infrastructure/repositories/mock-users.re
import { MockAuthenticationService } from "@/infrastructure/services/mock-authentication.service";
import type { IUsersRepository } from "@/application/repositories/users-repository.interface";
import type { IAuthenticationService } from "@/application/services/authentication-service.interface";
import { userFactory } from "@/__factories__/user.factory";
describe("authContainer", () => {
beforeEach(() => {
@@ -36,11 +37,8 @@ describe("authContainer", () => {
AUTH_SYMBOLS.IAuthenticationService,
);
// The service should be able to validate against the seeded users
const { session, cookie } = await service.createSession({
id: "1",
username: "alice",
passwordHash: "hashed_password_alice",
});
const user = userFactory.build({ id: "1", username: "alice", passwordHash: "hashed_password_alice" });
const { session, cookie } = await service.createSession(user);
expect(session.userId).toBe("1");
expect(cookie.value).toBe(session.id);