summaryrefslogtreecommitdiff
path: root/web-ui
diff options
context:
space:
mode:
authorGiovane <giovaneliberato@gmail.com>2015-11-16 15:49:23 -0200
committerGiovane <giovaneliberato@gmail.com>2015-11-16 15:49:23 -0200
commit83c409e197da1784f9c3f8999a622a62003f85c6 (patch)
tree9e6ccc9add3fbe9223eefa95c92e478f654388a9 /web-ui
parent014916a26482b510c2e330c980117e2e240e6fd9 (diff)
Ignore quotes when removing tag information #503
Diffstat (limited to 'web-ui')
-rw-r--r--web-ui/app/js/mail_view/ui/no_mails_available_pane.js2
-rw-r--r--web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js5
2 files changed, 6 insertions, 1 deletions
diff --git a/web-ui/app/js/mail_view/ui/no_mails_available_pane.js b/web-ui/app/js/mail_view/ui/no_mails_available_pane.js
index b1d5f9dd..5f083685 100644
--- a/web-ui/app/js/mail_view/ui/no_mails_available_pane.js
+++ b/web-ui/app/js/mail_view/ui/no_mails_available_pane.js
@@ -34,7 +34,7 @@ define(
forSearch: ''
});
- var mailsQueryMatch = /-?in:"[\w]+"|tag:"[\w]+"/g;
+ var mailsQueryMatch = /-?in:"?[\w]+"?|tag:"[\w]+"/g;
this.render = function() {
this.attr.tag = this.attr.tag.toUpperCase();
diff --git a/web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js b/web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js
index 868efc76..157e6c47 100644
--- a/web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js
+++ b/web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js
@@ -11,5 +11,10 @@ describeComponent('mail_view/ui/no_mails_available_pane', function () {
this.setupComponent({tag: 'all', forSearch: 'search'});
expect(this.$node.html()).toMatch('<div class="text">NO RESULTS FOR: \'SEARCH\'.</div>');
});
+
+ it('show only tag information when listing all mails', function () {
+ this.setupComponent({tag: 'all', forSearch: 'in:all'});
+ expect(this.$node.html()).toMatch('<div class="text">NO EMAILS IN \'ALL\'.</div>');
+ });
});
});