blob: 04d0e9d44d4f57400889f7d7f1f73c2f27e359de (
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 () {
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('');
});
});
|