describeMixin('mixins/with_mail_sandbox', function() { 'use strict'; beforeEach(function() { this.setupComponent(''); var iframe = document.querySelector('iframe'); var template = ['', '', '', '', '', '', '', '', '', ''].join(''); iframe.src = URL.createObjectURL(new Blob([template], {type: "text/html"})); }); it('should open reply container', function (done) { var showContainerEvent = spyOnEvent(document, Pixelated.events.ui.replyBox.showReplyContainer); this.component.showMailOnSandbox(Pixelated.testData().parsedMail.html); setTimeout(function() { expect(showContainerEvent).toHaveBeenTriggeredOn(document); done(); }, 200); }); });