Skip to content

Commit 414909d

Browse files
committed
test them all
1 parent 99334d0 commit 414909d

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

packages/compass-aggregations/src/components/focus-mode/focus-mode-stage-preview.spec.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,20 @@ describe('FocusModeStagePreview', function () {
8686
const preview = screen.getByTestId('focus-mode-stage-preview');
8787
expect(within(preview).getByText(/no preview documents/i)).to.exist;
8888
});
89-
it('renders missing search index text for $search', async function () {
90-
await renderFocusModePreview({
91-
stageOperator: '$search',
92-
documents: [],
89+
for (const stageOperator of ['$search', '$searchMeta', '$vectorSearch']) {
90+
it(`renders missing search index text for ${stageOperator}`, async function () {
91+
await renderFocusModePreview({
92+
stageOperator,
93+
documents: [],
94+
});
95+
expect(screen.getByText('No preview documents')).to.exist;
96+
expect(
97+
screen.getByText(
98+
'This may be because your search has no results or your search index does not exist.'
99+
)
100+
).to.exist;
93101
});
94-
expect(screen.getByText('No preview documents')).to.exist;
95-
expect(
96-
screen.getByText(
97-
'This may be because your search has no results or your search index does not exist.'
98-
)
99-
).to.exist;
100-
});
102+
}
101103
it('renders $out stage preview', async function () {
102104
await renderFocusModePreview(
103105
{

0 commit comments

Comments
 (0)