Render clarify search prompts as guidance only

This commit is contained in:
master
2026-03-08 11:50:34 +02:00
parent e01a499df9
commit abbfe64bd7
10 changed files with 224 additions and 124 deletions

View File

@@ -342,6 +342,26 @@ test.describe('Unified Search - Experience Quality UX', () => {
await expect(page.locator('.search__group').filter({ hasText: 'Recent' })).toHaveCount(0);
});
test('renders release clarify guidance as non-executable hints on /releases/versions', async ({ page }) => {
await mockSearchResponses(page, () => emptyResponse('mystery release blocker'));
await page.goto('/releases/versions');
await expect(page.locator('aside.sidebar')).toBeVisible({ timeout: 15_000 });
await typeInSearch(page, 'mystery release blocker');
await waitForResults(page);
await expect(page.locator('[data-answer-status="clarify"]')).toBeVisible();
await expect(page.locator('[data-answer-guidance="clarify"]').filter({
hasText: /add the environment or release you want to inspect\./i,
})).toHaveCount(1);
await expect(page.locator('[data-answer-guidance="clarify"]').filter({
hasText: /add whether you need blockers, approvals, or policy impact\./i,
})).toHaveCount(1);
await expect(page.getByRole('button', { name: 'Add the environment or release you want to inspect.' })).toHaveCount(0);
await expect(page.locator('app-global-search input[type="text"]')).toHaveValue('mystery release blocker');
});
test('uses backend answer framing and shows overflow as secondary results without manual filters', async ({ page }) => {
await mockSearchResponses(page, (query) =>
query.includes('critical findings')