diff --git a/internal_packages/notifications/spec/default-client-notif-spec.jsx b/internal_packages/notifications/spec/default-client-notif-spec.jsx index 5b478cd0a..afda2dab8 100644 --- a/internal_packages/notifications/spec/default-client-notif-spec.jsx +++ b/internal_packages/notifications/spec/default-client-notif-spec.jsx @@ -31,7 +31,7 @@ describe("DefaultClientNotif", function DefaultClientNotifTests() { expect(NylasEnv.config.get).toHaveBeenCalledWith(SETTINGS_KEY); }); it("renders nothing", () => { - expect(this.notif.find('.notification').exists()).toEqual(true); + expect(this.notif.find('.notification').exists()).toEqual(false); }); }); @@ -42,7 +42,7 @@ describe("DefaultClientNotif", function DefaultClientNotifTests() { expect(NylasEnv.config.get).toHaveBeenCalledWith(SETTINGS_KEY); }); it("renders a notification", () => { - expect(this.notif.find('.notification').exists()).toEqual(false); + expect(this.notif.find('.notification').exists()).toEqual(true); }); it("allows the user to set N1 as the default client", () => { @@ -66,7 +66,7 @@ describe("DefaultClientNotif", function DefaultClientNotifTests() { this.notif = mount() }) it("renders nothing", () => { - expect(this.notif.find('.notification').exists()).toEqual(true); + expect(this.notif.find('.notification').exists()).toEqual(false); }); }) }); diff --git a/internal_packages/notifications/spec/dev-mode-notif-spec.jsx b/internal_packages/notifications/spec/dev-mode-notif-spec.jsx index 5135f6620..0c8fcb99c 100644 --- a/internal_packages/notifications/spec/dev-mode-notif-spec.jsx +++ b/internal_packages/notifications/spec/dev-mode-notif-spec.jsx @@ -9,7 +9,7 @@ describe("DevModeNotif", function DevModeNotifTests() { this.notif = mount(); }) it("displays a notification", () => { - expect(this.notif.find('.notification').exists()).toEqual(false); + expect(this.notif.find('.notification').exists()).toEqual(true); }) }) @@ -19,7 +19,7 @@ describe("DevModeNotif", function DevModeNotifTests() { this.notif = mount(); }) it("doesn't display a notification", () => { - expect(this.notif.find('.notification').exists()).toEqual(true); + expect(this.notif.find('.notification').exists()).toEqual(false); }) }) }); diff --git a/internal_packages/notifications/spec/disabled-mail-rules-notif-spec.jsx b/internal_packages/notifications/spec/disabled-mail-rules-notif-spec.jsx index d395272d4..552c018ee 100644 --- a/internal_packages/notifications/spec/disabled-mail-rules-notif-spec.jsx +++ b/internal_packages/notifications/spec/disabled-mail-rules-notif-spec.jsx @@ -14,7 +14,7 @@ describe("DisabledMailRulesNotification", function DisabledMailRulesNotifTests() this.notif = mount() }) it("displays a notification", () => { - expect(this.notif.find('.notification').exists()).toEqual(false); + expect(this.notif.find('.notification').exists()).toEqual(true); }) it("allows users to open the preferences", () => { @@ -33,7 +33,7 @@ describe("DisabledMailRulesNotification", function DisabledMailRulesNotifTests() this.notif = mount() }) it("displays a notification", () => { - expect(this.notif.find('.notification').exists()).toEqual(false); + expect(this.notif.find('.notification').exists()).toEqual(true); }) it("allows users to open the preferences", () => { @@ -51,7 +51,7 @@ describe("DisabledMailRulesNotification", function DisabledMailRulesNotifTests() this.notif = mount() }) it("does not display a notification", () => { - expect(this.notif.find('.notification').exists()).toEqual(true); + expect(this.notif.find('.notification').exists()).toEqual(false); }) }) }) diff --git a/internal_packages/notifications/spec/offline-notif-spec.jsx b/internal_packages/notifications/spec/offline-notif-spec.jsx index 62b7a4553..4afb84b4a 100644 --- a/internal_packages/notifications/spec/offline-notif-spec.jsx +++ b/internal_packages/notifications/spec/offline-notif-spec.jsx @@ -10,7 +10,7 @@ describe("OfflineNotif", function offlineNotifTests() { this.notif = mount(); }) it("displays a notification", () => { - expect(this.notif.find('.notification').exists()).toEqual(false); + expect(this.notif.find('.notification').exists()).toEqual(true); }) it("allows the user to try connecting now", () => { @@ -24,7 +24,7 @@ describe("OfflineNotif", function offlineNotifTests() { this.notif = mount(); }) it("doesn't display a notification", () => { - expect(this.notif.find('.notification').exists()).toEqual(true); + expect(this.notif.find('.notification').exists()).toEqual(false); }) }) }); diff --git a/internal_packages/notifications/spec/priority-spec.jsx b/internal_packages/notifications/spec/priority-spec.jsx index ecbac130c..93478082c 100644 --- a/internal_packages/notifications/spec/priority-spec.jsx +++ b/internal_packages/notifications/spec/priority-spec.jsx @@ -14,9 +14,9 @@ const stubNotif = (priority) => { const checkHighestPriority = (expectedPriority, wrapper) => { const visibleElems = wrapper.find(".highest-priority") - expect(visibleElems.exists()).toEqual(false); + expect(visibleElems.exists()).toEqual(true); const titleElem = visibleElems.first().find('.title'); - expect(titleElem.exists()).toEqual(false); + expect(titleElem.exists()).toEqual(true); expect(titleElem.text().trim()).toEqual(`Priority ${expectedPriority}`); // Make sure there's only one highest-priority elem expect(visibleElems.get(1)).toEqual(undefined); diff --git a/src/components/newsletter-signup.jsx b/src/components/newsletter-signup.jsx index 341150bc5..4354361e3 100644 --- a/src/components/newsletter-signup.jsx +++ b/src/components/newsletter-signup.jsx @@ -40,8 +40,7 @@ export default class NewsletterSignup extends React.Component { LegacyEdgehillAPI.makeRequest({ method: 'GET', path: this._path(props), - }).run() - .then((status) => { + }).run().then((status) => { if (status === 'Never Subscribed') { this._onSubscribe(); } else { diff --git a/src/flux/edgehill-api.es6 b/src/flux/edgehill-api.es6 index 32b731747..ff7099fae 100644 --- a/src/flux/edgehill-api.es6 +++ b/src/flux/edgehill-api.es6 @@ -30,7 +30,7 @@ class _EdgehillAPI { makeRequest(options = {}) { if (NylasEnv.getLoadSettings().isSpec) { - return Promise.resolve(); + return {run: () => Promise.resolve()} } if (options.authWithNylasAPI) {