Test empty and non-empty searches separately
MODIFY
spec/project-find-view-spec.js
spec/project-find-view-spec.js
@@ -353,12 +353,21 @@ describe('ProjectFindView', () => {
})
it("closes the panel after search", async () => {
+ projectFindView.findEditor.setText('something')
atom.commands.dispatch(projectFindView.element, 'core:confirm');
await searchPromise;
expect(getAtomPanel()).not.toBeVisible();
});
+ it("closes the panel after an empty search", async () => {
+ projectFindView.findEditor.setText('')
+ atom.commands.dispatch(projectFindView.element, 'core:confirm');
+ await searchPromise;
+
+ expect(getAtomPanel()).not.toBeVisible();
+ })
+
it("does not close the panel after the replacement text is altered", async () => {
projectFindView.replaceEditor.setText('something else');

Test empty and non-empty searches separately