Add a test for an alignment setting of an image block in the editor [MAILPOET-1124]

This commit is contained in:
stoletniy
2017-10-09 13:00:39 +03:00
parent 9d93f3ea95
commit 0064970ed7
2 changed files with 6 additions and 1 deletions

View File

@@ -188,7 +188,7 @@ define([
expect(model.get('styles.link.textDecoration')).to.equal('underline'); expect(model.get('styles.link.textDecoration')).to.equal('underline');
}); });
it('updates the model when background color changes', function () { it('updates the model when text alignment changes', function () {
view.$('.mailpoet_field_footer_alignment').last().prop('checked', true).change(); view.$('.mailpoet_field_footer_alignment').last().prop('checked', true).change();
expect(model.get('styles.text.textAlign')).to.equal('right'); expect(model.get('styles.text.textAlign')).to.equal('right');
}); });

View File

@@ -211,6 +211,11 @@ define([
expect(model.get('fullWidth')).to.equal(false); expect(model.get('fullWidth')).to.equal(false);
}); });
it('updates the model when alignment changes', function () {
view.$('.mailpoet_field_image_alignment').first().prop('checked', true).change();
expect(model.get('styles.block.textAlign')).to.equal('left');
});
it.skip('closes the sidepanel after "Done" is clicked', function() { it.skip('closes the sidepanel after "Done" is clicked', function() {
var mock = sinon.mock().once(); var mock = sinon.mock().once();
global.MailPoet.Modal.cancel = mock; global.MailPoet.Modal.cancel = mock;