Add an option to open settings by clicking on the block for image,

button, social, divider and spacer blocks
This commit is contained in:
Tautvidas Sipavičius
2016-08-19 14:57:14 +03:00
parent da44a87415
commit 69c8670b01
12 changed files with 116 additions and 17 deletions

View File

@@ -16,7 +16,9 @@ define([
});
afterEach(function () {
delete EditorApplication.getChannel;
if(EditorApplication.getChannel) {
delete EditorApplication.getChannel;
}
});
it("has a button type", function () {
@@ -247,6 +249,13 @@ define([
it('has a specified font weight', function () {
expect(view.$('.mailpoet_editor_button').css('font-weight')).to.equal(model.get('styles.block.fontWeight'));
});
it('opens settings if clicked', function () {
var mock = sinon.mock().once();
model.on('startEditing', mock);
view.$('.mailpoet_editor_button').click();
mock.verify();
});
});
});