summaryrefslogtreecommitdiff
path: root/web-ui/test/spec/dispatchers
diff options
context:
space:
mode:
authorNavaL <mnandri@thoughtworks.com>2016-01-05 19:44:07 +0100
committerNavaL <mnandri@thoughtworks.com>2016-01-05 19:45:38 +0100
commit17695c1c9037d9edc927fb5265d380384eb6866a (patch)
tree44e26d41fec052c9b641d0eba0c92f625680c263 /web-ui/test/spec/dispatchers
parent0ca01a8a8e2cd9201f43fa840a30a0822215bfef (diff)
emptying attachment list when email sent -- in case the user stays on the same screen and re-click compose
Issue #548
Diffstat (limited to 'web-ui/test/spec/dispatchers')
-rw-r--r--web-ui/test/spec/dispatchers/right_pane_dispatcher.spec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/web-ui/test/spec/dispatchers/right_pane_dispatcher.spec.js b/web-ui/test/spec/dispatchers/right_pane_dispatcher.spec.js
index 9df1d557..89793183 100644
--- a/web-ui/test/spec/dispatchers/right_pane_dispatcher.spec.js
+++ b/web-ui/test/spec/dispatchers/right_pane_dispatcher.spec.js
@@ -15,6 +15,17 @@ describeComponent('dispatchers/right_pane_dispatcher', function () {
expect(composeBox.attachTo).toHaveBeenCalled();
});
+ it('should trigger reset attachment list on open compose box event', function () {
+ var composeBox = require('mail_view/ui/compose_box');
+ Pixelated.mockBloodhound();
+ this.setupComponent();
+ var triggerRestAttachment = spyOnEvent(document, Pixelated.events.mail.resetAttachments);
+ this.component.trigger(document, Pixelated.events.dispatchers.rightPane.openComposeBox);
+
+ expect(triggerRestAttachment).toHaveBeenTriggeredOn(document);
+ });
+
+
describe('no message selected', function () {
var noMessageSelectedPane;
beforeEach(function () {