From c1461e6b2876c7c10e1b83264188a6ea9addf1ac Mon Sep 17 00:00:00 2001 From: Brian Love Date: Sat, 6 Jun 2026 19:39:59 -0700 Subject: [PATCH] fix(chat): conform tool-views test selector to component-selector lint rule The chat-tool-views spec's fixture component used selector 'test-weather-card' (added in #600), which fails @angular-eslint/component-selector (must start with 'chat'/'a2ui'). Since the Library CI job lints all libs, this broke chat:lint on main and blocked every PR. Rename to 'chat-test-weather-card' (4 occurrences, test-only, zero runtime impact). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../chat-tool-views/chat-tool-views.component.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/chat/src/lib/primitives/chat-tool-views/chat-tool-views.component.spec.ts b/libs/chat/src/lib/primitives/chat-tool-views/chat-tool-views.component.spec.ts index 27501dec..5dd9c111 100644 --- a/libs/chat/src/lib/primitives/chat-tool-views/chat-tool-views.component.spec.ts +++ b/libs/chat/src/lib/primitives/chat-tool-views/chat-tool-views.component.spec.ts @@ -10,7 +10,7 @@ import { ChatToolViewsComponent } from './chat-tool-views.component'; // A minimal view component that renders the props it receives so the test // can assert which fields reached it. @Component({ - selector: 'test-weather-card', + selector: 'chat-test-weather-card', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
{{ location() }}
{{ temperatureF() }}
{{ status() }}
`, @@ -51,7 +51,7 @@ describe('ChatToolViewsComponent', () => { ] as ToolCall[]); const fixture = mountHost(agent, msg); const el = fixture.nativeElement as HTMLElement; - expect(el.querySelector('test-weather-card')).toBeTruthy(); + expect(el.querySelector('chat-test-weather-card')).toBeTruthy(); expect(el.querySelector('.loc')?.textContent).toContain('San Francisco'); expect(el.querySelector('.st')?.textContent).toContain('running'); }); @@ -77,7 +77,7 @@ describe('ChatToolViewsComponent', () => { ] as ToolCall[]); const fixture = mountHost(agent, msg); const el = fixture.nativeElement as HTMLElement; - expect(el.querySelector('test-weather-card')).toBeNull(); + expect(el.querySelector('chat-test-weather-card')).toBeNull(); }); it('renders nothing when views is undefined', () => { @@ -96,6 +96,6 @@ describe('ChatToolViewsComponent', () => { } const fixture = TestBed.createComponent(BareHost); fixture.detectChanges(); - expect((fixture.nativeElement as HTMLElement).querySelector('test-weather-card')).toBeNull(); + expect((fixture.nativeElement as HTMLElement).querySelector('chat-test-weather-card')).toBeNull(); }); });