Skip to content

Commit 3bd25a5

Browse files
add negative test case
1 parent 6f36bf1 commit 3bd25a5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/compass-aggregations/src/modules/update-view.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ describe('update-view module', function () {
8787
});
8888
});
8989

90+
it('does not shows confirmation banner if search indexes are not present', async function () {
91+
stateMock.searchIndexes.indexes = [];
92+
93+
const runUpdateView = updateView();
94+
await runUpdateView(dispatchFake, getStateMock, thunkArg as any);
95+
96+
expect(showConfirmationStub.calledOnce).to.be.false;
97+
});
98+
9099
it('shows confirmation banner when search indexes are present', async function () {
91100
const runUpdateView = updateView();
92101
await runUpdateView(dispatchFake, getStateMock, thunkArg as any);

0 commit comments

Comments
 (0)