Skip to content

Commit aca1360

Browse files
v-rudkovskiyViacheslav Rudkovskyi
and
Viacheslav Rudkovskyi
authored
NLIC-2200: Notify customer about expirable license end (#61)
* add warning level events * add warning level events * rename events --------- Co-authored-by: Viacheslav Rudkovskyi <[email protected]>
1 parent 23c6a40 commit aca1360

6 files changed

+2431
-3225
lines changed

Diff for: dist/netlicensing-client.js

+1,193-1,594
Large diffs are not rendered by default.

Diff for: dist/netlicensing-client.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/netlicensing-client.node.js

+1,212-1,613
Large diffs are not rendered by default.

Diff for: dist/netlicensing-client.node.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/Constants.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,9 @@ export default {
217217
WEBHOOK: 'WEBHOOK',
218218
},
219219
Event: {
220-
CREATE_LICENSEE: 'CREATE_LICENSEE',
221-
CREATE_LICENSE: 'CREATE_LICENSE',
220+
LICENSEE_CREATED: 'LICENSEE_CREATED',
221+
LICENSE_CREATED: 'LICENSE_CREATED',
222+
WARNING_LEVEL_CHANGED: 'WARNING_LEVEL_CHANGED',
222223
},
223224
},
224225
};

Diff for: test/specs/entities/Notification.spec.js

+21-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Notification from '@/entities/Notification';
2+
import Constants from '@/Constants';
23

34
describe('entities/Notification', () => {
45
let notification;
@@ -76,20 +77,20 @@ describe('entities/Notification', () => {
7677
});
7778

7879
it('check "events" property setters/getters', () => {
79-
notification.setProperty('events', 'CREATE_LICENSEE,CREATE_LICENSE');
80-
expect(notification.getProperty('events')).toBe('CREATE_LICENSEE,CREATE_LICENSE');
81-
expect(notification.getEvents()).toBe('CREATE_LICENSEE,CREATE_LICENSE');
82-
expect(notification.events).toBe('CREATE_LICENSEE,CREATE_LICENSE');
83-
84-
notification.setEvents('CREATE_LICENSEE');
85-
expect(notification.getProperty('events')).toBe('CREATE_LICENSEE');
86-
expect(notification.getEvents()).toBe('CREATE_LICENSEE');
87-
expect(notification.events).toBe('CREATE_LICENSEE');
88-
89-
notification.events = 'CREATE_LICENSE';
90-
expect(notification.getProperty('events')).toBe('CREATE_LICENSE');
91-
expect(notification.getEvents()).toBe('CREATE_LICENSE');
92-
expect(notification.events).toBe('CREATE_LICENSE');
80+
notification.setProperty('events', 'LICENSEE_CREATED,LICENSE_CREATED');
81+
expect(notification.getProperty('events')).toBe('LICENSEE_CREATED,LICENSE_CREATED');
82+
expect(notification.getEvents()).toBe('LICENSEE_CREATED,LICENSE_CREATED');
83+
expect(notification.events).toBe('LICENSEE_CREATED,LICENSE_CREATED');
84+
85+
notification.setEvents('LICENSEE_CREATED');
86+
expect(notification.getProperty('events')).toBe('LICENSEE_CREATED');
87+
expect(notification.getEvents()).toBe('LICENSEE_CREATED');
88+
expect(notification.events).toBe('LICENSEE_CREATED');
89+
90+
notification.events = 'LICENSE_CREATED';
91+
expect(notification.getProperty('events')).toBe('LICENSE_CREATED');
92+
expect(notification.getEvents()).toBe('LICENSE_CREATED');
93+
expect(notification.events).toBe('LICENSE_CREATED');
9394
});
9495

9596
it('check "payload" property setters/getters', () => {
@@ -159,4 +160,10 @@ describe('entities/Notification', () => {
159160
expect(notification.getProperty('number')).toBe('number');
160161
expect(notification.getNumber()).toBe('number');
161162
});
163+
164+
it('check events', () => {
165+
expect(Constants.Notification.Event.LICENSEE_CREATED).toBe('LICENSEE_CREATED');
166+
expect(Constants.Notification.Event.LICENSE_CREATED).toBe('LICENSE_CREATED');
167+
expect(Constants.Notification.Event.WARNING_LEVEL_CHANGED).toBe('WARNING_LEVEL_CHANGED');
168+
});
162169
});

0 commit comments

Comments
 (0)