Skip to content

Commit 20da33f

Browse files
committed
and inverse test
1 parent 414909d commit 20da33f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,22 @@ describe('FocusModeStagePreview', function () {
9999
)
100100
).to.exist;
101101
});
102+
103+
it(`does not render missing search index text for ${stageOperator} and documents.length > 0`, async function () {
104+
await renderFocusModePreview({
105+
stageOperator,
106+
documents: [
107+
new HadronDocument({ _id: 12345 }),
108+
new HadronDocument({ _id: 54321 }),
109+
],
110+
});
111+
expect(screen.queryByText('No preview documents')).to.not.exist;
112+
expect(
113+
screen.queryByText(
114+
'This may be because your search has no results or your search index does not exist.'
115+
)
116+
).to.not.exist;
117+
});
102118
}
103119
it('renders $out stage preview', async function () {
104120
await renderFocusModePreview(

0 commit comments

Comments
 (0)