summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web-ui/app/js/mail_view/ui/mail_view.js3
-rw-r--r--web-ui/test/spec/mail_view/ui/mail_view.spec.js9
2 files changed, 2 insertions, 10 deletions
diff --git a/web-ui/app/js/mail_view/ui/mail_view.js b/web-ui/app/js/mail_view/ui/mail_view.js
index 3408c8af..4c9dce30 100644
--- a/web-ui/app/js/mail_view/ui/mail_view.js
+++ b/web-ui/app/js/mail_view/ui/mail_view.js
@@ -38,7 +38,6 @@ define(
tags: '.mail-read-view__header-tags-tag',
newTagInput: '#new-tag-input',
newTagButton: '#new-tag-button',
- addNew: '.mail-read-view__header-tags-new-button',
trashButton: '#trash-button',
archiveButton: '#archive-button',
closeMailButton: '.close-mail-button'
@@ -198,13 +197,11 @@ define(
this.addTagLoseFocus = function () {
this.select('newTagInput').hide();
this.select('newTagInput').typeahead('val', '');
- this.select('addNew').show();
};
this.showNewTagInput = function () {
this.select('newTagInput').show();
this.select('newTagInput').focus();
- this.select('addNew').hide();
};
this.removeTag = function (tag) {
diff --git a/web-ui/test/spec/mail_view/ui/mail_view.spec.js b/web-ui/test/spec/mail_view/ui/mail_view.spec.js
index f44d71ee..438df57f 100644
--- a/web-ui/test/spec/mail_view/ui/mail_view.spec.js
+++ b/web-ui/test/spec/mail_view/ui/mail_view.spec.js
@@ -79,23 +79,20 @@ describeComponent('mail_view/ui/mail_view', function () {
});
it('verifies if new tag input is hidden when rendering mail view', function() {
-
this.component.displayMail({}, testData);
var newTagInputComponent = this.component.select('newTagInput');
expect(newTagInputComponent.attr('style').trim()).toEqual('display: none;');
});
- it('verifies if new tag input is shown when clicking on new tag button ', function() {
- this.component.displayMail({}, testData);
+ it('verifies if new tag input is shown when clicking on new tag button', function() {
+ this.component.displayMail({}, testData);
var newTagInputComponent = this.component.select('newTagInput');
- var addNewComponent = this.component.select('addNew');
this.component.select('newTagButton').click();
expect(newTagInputComponent.attr('style').trim()).not.toEqual('display: none;');
- expect(addNewComponent.attr('style').trim()).toEqual('display: none;');
});
it('hides new tag button when pressing esc key', function(){
@@ -104,12 +101,10 @@ describeComponent('mail_view/ui/mail_view', function () {
var e = creatingEvent('keydown', 27);
var newTagInputComponent = this.component.select('newTagInput');
- var addNewComponent = this.component.select('addNew');
newTagInputComponent.trigger(e);
expect(newTagInputComponent.attr('style').trim()).toEqual('display: none;');
- expect(addNewComponent.attr('style').trim()).not.toEqual('display: none;');
});
it('assumes that the mail is encrypted and valid if at least one of the locks are valid', function() {