blob: 5b25b5fb24b48c5d3899ce81eddf813941e31ba7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/* global Pixelated */
describeComponent('user_alerts/ui/user_alerts', function () {
'use strict';
beforeEach(function () {
this.setupComponent('<div id="userAlerts"></div>', { dismissTimeout: 100 });
});
it('should render message when ui:user_alerts:displayMessage is triggered', function () {
this.component.trigger(Pixelated.events.ui.userAlerts.displayMessage, { message: 'a message' });
expect(this.component.$node.html()).toMatch('a message');
});
it('should be emptied and hidden when hide is called', function() {
expect(this.$node).not.toBeHidden();
this.component.hide();
expect(this.$node).toBeHidden();
expect(this.$node.html()).toEqual('');
});
});
|