From 8cf4f7c2e418579d46c6d079264fba391d1dbeea Mon Sep 17 00:00:00 2001 From: Marcel Date: Sat, 25 Apr 2026 09:03:57 +0200 Subject: [PATCH] test(bulk-upload): fix ScopeCard spec assertions to match actual component classes /brand-mint/ never matched (component uses border-accent bg-accent-bg); companion test also updated to assert the meaningful negative. getByText('5') fixed to exact:true to avoid strict-mode ambiguity. Co-Authored-By: Claude Sonnet 4.6 --- .../lib/components/document/ScopeCard.svelte.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/lib/components/document/ScopeCard.svelte.spec.ts b/frontend/src/lib/components/document/ScopeCard.svelte.spec.ts index 51c4ae1b..9a04b7d9 100644 --- a/frontend/src/lib/components/document/ScopeCard.svelte.spec.ts +++ b/frontend/src/lib/components/document/ScopeCard.svelte.spec.ts @@ -6,21 +6,21 @@ import ScopeCard from './ScopeCard.svelte'; afterEach(cleanup); describe('ScopeCard', () => { - it('per-file variant has mint background class', async () => { + it('per-file variant has accent background class', async () => { const { container } = render(ScopeCard, { variant: 'per-file', count: 1 }); const card = container.querySelector('[data-testid="scope-card"]'); - expect(card?.className).toMatch(/brand-mint/); + expect(card?.className).toMatch(/bg-accent-bg/); }); - it('shared variant does not have mint background', async () => { + it('shared variant does not have accent background', async () => { const { container } = render(ScopeCard, { variant: 'shared', count: 3 }); const card = container.querySelector('[data-testid="scope-card"]'); - expect(card?.className).not.toMatch(/bg-brand-mint/); + expect(card?.className).not.toMatch(/bg-accent-bg/); }); it('shared variant renders count badge with file count', async () => { render(ScopeCard, { variant: 'shared', count: 5 }); - await expect.element(page.getByText('5')).toBeInTheDocument(); + await expect.element(page.getByText('5', { exact: true })).toBeInTheDocument(); }); it('per-file variant renders slot content', async () => {