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 @@ -14,6 +14,11 @@ import {
} from '../message-disposition-presentation';
import { QueuePanel } from '../QueuePanel';

/** The panel header itself reads 排队等待中; the claims below are about per-row route chips. */
function textWithoutPanelHeader(container: HTMLElement): string {
return (container.textContent ?? '').replace('排队等待中', '');
}

vi.mock('@/utils/api-client', () => ({
apiFetch: vi.fn(async () => ({ ok: true, json: async () => ({}) })),
}));
Expand Down Expand Up @@ -248,7 +253,7 @@ describe('F264 Queue UX hierarchy — component claims', () => {
useChatStore.setState({ queue: [continueEntry, nextEntry] });
renderQueuePanel();

const text = container.textContent ?? '';
const text = textWithoutPanelHeader(container);
expect(text).not.toContain('立即发送,引导回复');
expect(text).not.toContain('排队等待');
expect(container.querySelectorAll('[data-queue-target-row="opus"]')).toHaveLength(2);
Expand Down Expand Up @@ -276,7 +281,7 @@ describe('F264 Queue UX hierarchy — component claims', () => {
renderQueuePanel();

expect(container.querySelector(`[data-testid="intent-chip-q-${source}-opus"]`)).toBeNull();
expect(container.textContent).not.toContain('排队等待');
expect(textWithoutPanelHeader(container)).not.toContain('排队等待');
expect(container.textContent).not.toContain('立即发送,引导回复');
});

Expand Down Expand Up @@ -451,7 +456,7 @@ describe('F264 Queue UX hierarchy — component claims', () => {
renderQueuePanel();

expect(container.querySelectorAll('[data-queue-target-row]')).toHaveLength(2);
const text = container.textContent ?? '';
const text = textWithoutPanelHeader(container);
expect(text).not.toContain('立即发送,引导回复');
expect(text).not.toContain('排队等待');
expect(text).not.toContain('当前接入不支持');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import { useToastStore } from '@/stores/toastStore';
import { apiFetch } from '@/utils/api-client';
import { QueuePanel } from '../QueuePanel';

/** The panel header itself reads 排队等待中; the claims below are about per-row route chips. */
function textWithoutPanelHeader(container: HTMLElement): string {
return (container.textContent ?? '').replace('排队等待中', '');
}

vi.mock('@/hooks/useCatData', () => ({
useCatData: () => {
const cats = [
Expand Down Expand Up @@ -844,7 +849,7 @@ describe('QueuePanel steer (F047)', () => {
root.render(React.createElement(QueuePanel, { threadId: 'thread-1' }));
});

expect(container.textContent).not.toContain('排队等待');
expect(textWithoutPanelHeader(container)).not.toContain('排队等待');
expect(container.textContent).not.toContain('当前接入不支持引导回复');
expect(container.querySelector('[data-testid="remind-q1-opus"]')).toBeNull();
});
Expand Down