theme and search fixes
This commit is contained in:
@@ -362,6 +362,34 @@ test.describe('Unified Search - Experience Quality UX', () => {
|
||||
await expect(page.locator('app-global-search input[type="text"]')).toHaveValue('mystery release blocker');
|
||||
});
|
||||
|
||||
test('shows search-readiness guidance instead of blaming the query when the live search corpus is unavailable', async ({ page }) => {
|
||||
await page.unroute('**/api/v1/search/suggestions/evaluate');
|
||||
await page.route('**/api/v1/search/suggestions/evaluate', async (route) =>
|
||||
route.fulfill({
|
||||
status: 404,
|
||||
body: '',
|
||||
}),
|
||||
);
|
||||
await mockSearchResponses(page, () => emptyResponse('database connectivity'));
|
||||
|
||||
await page.goto('/releases/versions');
|
||||
await expect(page.locator('aside.sidebar')).toBeVisible({ timeout: 15_000 });
|
||||
|
||||
const searchInput = page.locator('app-global-search input[type="text"]');
|
||||
await searchInput.focus();
|
||||
await waitForResults(page);
|
||||
await searchInput.fill('database connectivity');
|
||||
await searchInput.press('Enter');
|
||||
await waitForResults(page);
|
||||
|
||||
const answerPanel = page.locator('[data-answer-status="insufficient"]');
|
||||
await expect(answerPanel).toBeVisible();
|
||||
await expect(answerPanel).toContainText(/search needs live data/i);
|
||||
await expect(answerPanel).toContainText(/returned zero indexed matches/i);
|
||||
await expect(answerPanel).toContainText(/suggestion verification is also unavailable/i);
|
||||
await expect(page.locator('[data-answer-guidance="clarify"]')).toHaveCount(0);
|
||||
});
|
||||
|
||||
test('uses backend answer framing and shows overflow as secondary results without manual filters', async ({ page }) => {
|
||||
await mockSearchResponses(page, (query) =>
|
||||
query.includes('critical findings')
|
||||
|
||||
Reference in New Issue
Block a user