diff --git a/Chart/Position.enum.js b/Chart/Position.js similarity index 100% rename from Chart/Position.enum.js rename to Chart/Position.js diff --git a/Message/Notification/App/AppNotification.js b/Message/Notification/App/AppNotification.js index b0b3c2c..4d82dbe 100644 --- a/Message/Notification/App/AppNotification.js +++ b/Message/Notification/App/AppNotification.js @@ -24,11 +24,6 @@ this.status = status; }; - requestPermission () - { - const self = this; - }; - send (msg) { const tpl = document.getElementById('app-message'); diff --git a/Message/Notification/NotificationLevel.enum.js b/Message/Notification/NotificationLevel.js similarity index 100% rename from Message/Notification/NotificationLevel.enum.js rename to Message/Notification/NotificationLevel.js diff --git a/Message/Notification/NotificationType.enum.js b/Message/Notification/NotificationType.js similarity index 100% rename from Message/Notification/NotificationType.enum.js rename to Message/Notification/NotificationType.js diff --git a/tests/Chart/chart-column.htm b/tests/Chart/chart-column.htm index dfb290e..6b04c6a 100644 --- a/tests/Chart/chart-column.htm +++ b/tests/Chart/chart-column.htm @@ -91,7 +91,7 @@ - + diff --git a/tests/Chart/chart-line.htm b/tests/Chart/chart-line.htm index e471f86..44081c3 100644 --- a/tests/Chart/chart-line.htm +++ b/tests/Chart/chart-line.htm @@ -87,7 +87,7 @@ - + diff --git a/tests/Chart/chart-pie.htm b/tests/Chart/chart-pie.htm index 98e733d..a0eb13b 100644 --- a/tests/Chart/chart-pie.htm +++ b/tests/Chart/chart-pie.htm @@ -91,7 +91,7 @@ - + diff --git a/tests/Chart/chart-radar.htm b/tests/Chart/chart-radar.htm index ee4981f..dad16f2 100644 --- a/tests/Chart/chart-radar.htm +++ b/tests/Chart/chart-radar.htm @@ -87,7 +87,7 @@ - + diff --git a/tests/Message/Notification/App/AppNotificationTest.js b/tests/Message/Notification/App/AppNotificationTest.js deleted file mode 100644 index b12bec5..0000000 --- a/tests/Message/Notification/App/AppNotificationTest.js +++ /dev/null @@ -1,12 +0,0 @@ -describe('AppNotificationTest', function () -{ - "use strict"; - - beforeEach(function () - { - }); - - afterEach(function () - { - }); -} diff --git a/tests/Message/Notification/Browser/BrowserNotificationTest.js b/tests/Message/Notification/Browser/BrowserNotificationTest.js deleted file mode 100644 index df58563..0000000 --- a/tests/Message/Notification/Browser/BrowserNotificationTest.js +++ /dev/null @@ -1,12 +0,0 @@ -describe('BrowserNotificationTest', function () -{ - "use strict"; - - beforeEach(function () - { - }); - - afterEach(function () - { - }); -} diff --git a/tests/Message/Notification/NotificationLevelTest.js b/tests/Message/Notification/NotificationLevelTest.js new file mode 100644 index 0000000..4b599f3 --- /dev/null +++ b/tests/Message/Notification/NotificationLevelTest.js @@ -0,0 +1,20 @@ +describe('NotificationLevelTest', function () +{ + "use strict"; + + describe('testEnum', function () + { + it('Testing amount of enums', function () + { + expect(Object.keys(jsOMS.Message.Notification.NotificationLevel).length).toBe(4); + }); + + it('Testing values of enums', function () + { + expect(jsOMS.Message.Notification.NotificationLevel.OK).toBe('ok'); + expect(jsOMS.Message.Notification.NotificationLevel.INFO).toBe('info'); + expect(jsOMS.Message.Notification.NotificationLevel.WARNING).toBe('warning'); + expect(jsOMS.Message.Notification.NotificationLevel.ERROR).toBe('error'); + }); + }); +}); diff --git a/tests/Message/Notification/NotificationManagerTest.js b/tests/Message/Notification/NotificationManagerTest.js index 816621d..9f4c12a 100644 --- a/tests/Message/Notification/NotificationManagerTest.js +++ b/tests/Message/Notification/NotificationManagerTest.js @@ -2,11 +2,14 @@ describe('NotificationManagerTest', function () { "use strict"; - beforeEach(function () + describe('testDefault', function () { + it('Testing default functionality', function () + { + let manager = new jsOMS.Message.Notification.NotificationManager(); + + expect(manager.getAppNotifier()).toEqual(jasmine.any(jsOMS.Message.Notification.App.AppNotification)); + expect(manager.getBrowserNotifier()).toEqual(jasmine.any(jsOMS.Message.Notification.Browser.BrowserNotification)); + }); }); - - afterEach(function () - { - }); -} +}); \ No newline at end of file diff --git a/tests/Message/Notification/NotificationMessageTest.js b/tests/Message/Notification/NotificationMessageTest.js index ad4ca63..62cdbd9 100644 --- a/tests/Message/Notification/NotificationMessageTest.js +++ b/tests/Message/Notification/NotificationMessageTest.js @@ -2,11 +2,15 @@ describe('NotificationMessageTest', function () { "use strict"; - beforeEach(function () + describe('testDefault', function () { + it('Testing default functionality', function () + { + let msg = new jsOMS.Message.Notification.NotificationMessage('ok', 'abc', 'def'); + + expect(msg.status).toBe('ok'); + expect(msg.title).toBe('abc'); + expect(msg.message).toBe('def'); + }); }); - - afterEach(function () - { - }); -} +}); \ No newline at end of file diff --git a/tests/Message/Notification/NotificationTypeTest.enum b/tests/Message/Notification/NotificationTypeTest.enum deleted file mode 100644 index 4153403..0000000 --- a/tests/Message/Notification/NotificationTypeTest.enum +++ /dev/null @@ -1,12 +0,0 @@ -describe('NotificationTypeTest', function () -{ - "use strict"; - - beforeEach(function () - { - }); - - afterEach(function () - { - }); -} diff --git a/tests/Message/Notification/NotificationTypeTest.js b/tests/Message/Notification/NotificationTypeTest.js new file mode 100644 index 0000000..dddd2af --- /dev/null +++ b/tests/Message/Notification/NotificationTypeTest.js @@ -0,0 +1,18 @@ +describe('NotificationTypeTest', function () +{ + "use strict"; + + describe('testEnum', function () + { + it('Testing amount of enums', function () + { + expect(Object.keys(jsOMS.Message.Notification.NotificationType).length).toBe(2); + }); + + it('Testing values of enums', function () + { + expect(jsOMS.Message.Notification.NotificationType.APP_NOTIFICATION).toBe(1); + expect(jsOMS.Message.Notification.NotificationType.BROWSER_NOTIFICATION).toBe(2); + }); + }); +}); diff --git a/tests/SpecRunner.html b/tests/SpecRunner.html index 362f53f..b6abbc4 100644 --- a/tests/SpecRunner.html +++ b/tests/SpecRunner.html @@ -35,6 +35,13 @@ + + + + + + + @@ -53,6 +60,11 @@ + + + + +