diff --git a/e2e/tests/functional/plugins/notebook/tags.e2e.spec.js b/e2e/tests/functional/plugins/notebook/tags.e2e.spec.js index b11543872e..dc003185e6 100644 --- a/e2e/tests/functional/plugins/notebook/tags.e2e.spec.js +++ b/e2e/tests/functional/plugins/notebook/tags.e2e.spec.js @@ -111,7 +111,7 @@ test.describe('Tagging in Notebooks @addInit', () => { await expect(page.locator('[aria-label="Autocomplete Options"]')).not.toContainText("Driving"); await expect(page.locator('[aria-label="Autocomplete Options"]')).toContainText("Drilling"); }); - test('Can search for tags', async ({ page }) => { + test('Can search for tags and preview works properly', async ({ page }) => { await createNotebookEntryAndTags(page); await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').click(); await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').fill('sc'); @@ -126,6 +126,19 @@ test.describe('Tagging in Notebooks @addInit', () => { await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').click(); await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').fill('Xq'); await expect(page.locator('text=No results found')).toBeVisible(); + + await createDomainObjectWithDefaults(page, { + type: 'Display Layout' + }); + + // Go back into edit mode for the display layout + await page.locator('button[title="Edit"]').click(); + + await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').click(); + await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').fill('Sc'); + await expect(page.locator('[aria-label="Search Result"]')).toContainText("Science"); + await page.getByText('Entry 0').click(); + await expect(page.locator('.js-preview-window')).toBeVisible(); }); test('Can delete tags', async ({ page }) => { diff --git a/src/ui/layout/search/AnnotationSearchResult.vue b/src/ui/layout/search/AnnotationSearchResult.vue index d97f656339..3116712b4c 100644 --- a/src/ui/layout/search/AnnotationSearchResult.vue +++ b/src/ui/layout/search/AnnotationSearchResult.vue @@ -67,6 +67,7 @@