[Style] Minor style changes

This commit is contained in:
Alex M
2016-10-01 22:40:21 +03:00
parent 7439d949c4
commit e03c725b86

View File

@@ -19,6 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global describe,it,expect,beforeEach,jasmine*/
define( define(
['../src/NotificationService'], ['../src/NotificationService'],
@@ -53,8 +54,7 @@ define(
}; };
}); });
it("gets a new success notification, making" + it("activates success notifications", function () {
" the notification active", function () {
var activeNotification; var activeNotification;
notificationService.notify(successModel); notificationService.notify(successModel);
activeNotification = notificationService.getActiveNotification(); activeNotification = notificationService.getActiveNotification();
@@ -74,8 +74,7 @@ define(
}); });
it("allows specification of an info notification given just a" + it("activates an info notification built with just the title", function () {
" title, making the notification active", function () {
var activeNotification, var activeNotification,
notificationTitle = "Test info notification"; notificationTitle = "Test info notification";
notificationService.info(notificationTitle); notificationService.info(notificationTitle);
@@ -84,8 +83,7 @@ define(
expect(activeNotification.model.severity).toBe("info"); expect(activeNotification.model.severity).toBe("info");
}); });
it("gets a new success notification with" + it("gets a new success notification with numerical auto-dismiss specified. ", function () {
" numerical auto-dismiss specified. ", function () {
var activeNotification; var activeNotification;
successModel.autoDismiss = 1000; successModel.autoDismiss = 1000;
notificationService.notify(successModel); notificationService.notify(successModel);
@@ -98,8 +96,7 @@ define(
expect(activeNotification).toBeUndefined(); expect(activeNotification).toBeUndefined();
}); });
it("gets a new notification with" + it("gets a new notification with boolean auto-dismiss specified. ", function () {
" boolean auto-dismiss specified. ", function () {
var activeNotification; var activeNotification;
successModel.autoDismiss = true; successModel.autoDismiss = true;
notificationService.notify(successModel); notificationService.notify(successModel);
@@ -143,9 +140,8 @@ define(
expect(notificationService.notifications.length).toBe(0); expect(notificationService.notifications.length).toBe(0);
}); });
describe(" gets called with multiple notifications", function () { describe("when called with multiple notifications", function () {
it("auto-dismisses the previously active notification, making" + it("auto-dismisses the previously active notification, making the new notification active", function () {
" the new notification active", function () {
var activeNotification; var activeNotification;
//First pre-load with a info message //First pre-load with a info message
notificationService.notify(successModel); notificationService.notify(successModel);
@@ -165,6 +161,7 @@ define(
activeNotification = notificationService.getActiveNotification(); activeNotification = notificationService.getActiveNotification();
expect(activeNotification.model).toBe(errorModel); expect(activeNotification.model).toBe(errorModel);
}); });
it("auto-minimizes an active error notification", function () { it("auto-minimizes an active error notification", function () {
var activeNotification; var activeNotification;
//First pre-load with an error message //First pre-load with an error message
@@ -186,8 +183,8 @@ define(
expect(activeNotification.model).toBe(successModel); expect(activeNotification.model).toBe(successModel);
expect(errorModel.minimized).toEqual(true); expect(errorModel.minimized).toEqual(true);
}); });
it("auto-minimizes errors when a number of them arrive in" +
" short succession ", function () { it("auto-minimizes errors when a number of them arrive in short succession", function () {
var activeNotification, var activeNotification,
error2 = { error2 = {
title: "Second Mock Error Notification", title: "Second Mock Error Notification",
@@ -228,7 +225,6 @@ define(
notificationService.getActiveNotification(); notificationService.getActiveNotification();
expect(activeNotification.model).toBe(error3); expect(activeNotification.model).toBe(error3);
expect(error2.minimized).toEqual(true); expect(error2.minimized).toEqual(true);
}); });
}); });
}); });