summaryrefslogtreecommitdiff
path: root/web-ui/test/spec/user_alerts
diff options
context:
space:
mode:
authorGislene Pereira <gislene01@gmail.com>2016-02-19 14:56:09 -0300
committerNavaL <ayoyo@thoughtworks.com>2016-02-19 15:40:54 -0300
commit940df3e2e12ff862c9e190fdfcd9a0278164a318 (patch)
tree327c126f1ba7251854006e43380e3eba6122d0d1 /web-ui/test/spec/user_alerts
parenta6202acbb44162e867f107a9cf262d95a41e4347 (diff)
Close the compose/inline box right after user clicks Send button and
show message later when the email is sent or not. The Growl will be yellow if success and red if the email failed to be sent. Issue #609
Diffstat (limited to 'web-ui/test/spec/user_alerts')
-rw-r--r--web-ui/test/spec/user_alerts/ui/user_alerts.spec.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/web-ui/test/spec/user_alerts/ui/user_alerts.spec.js b/web-ui/test/spec/user_alerts/ui/user_alerts.spec.js
index 5b25b5fb..5d87795a 100644
--- a/web-ui/test/spec/user_alerts/ui/user_alerts.spec.js
+++ b/web-ui/test/spec/user_alerts/ui/user_alerts.spec.js
@@ -10,7 +10,13 @@ describeComponent('user_alerts/ui/user_alerts', function () {
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');
+ expect(this.component.$node.html()).toEqual('<span class="success">a message</span>\n');
+ });
+
+ it('should render error message', function () {
+ this.component.trigger(Pixelated.events.ui.userAlerts.displayMessage, { message: 'send failed', class: 'error' });
+
+ expect(this.component.$node.html()).toEqual('<span class="error">send failed</span>\n');
});
it('should be emptied and hidden when hide is called', function() {