Do not save defaults for containers
This commit is contained in:
committed by
pavel-mailpoet
parent
eb4d2ab829
commit
0d514a8084
@ -48,6 +48,7 @@ define([
|
|||||||
blocks: new BlockCollection()
|
blocks: new BlockCollection()
|
||||||
}, App.getConfig().get('blockDefaults.container'));
|
}, App.getConfig().get('blockDefaults.container'));
|
||||||
},
|
},
|
||||||
|
_updateDefaults: function updateDefaults() {},
|
||||||
validate: function () {
|
validate: function () {
|
||||||
// Recursively propagate validation checks to blocks in the tree
|
// Recursively propagate validation checks to blocks in the tree
|
||||||
var invalidBlock = this.get('blocks').find(function (block) { return !block.isValid(); });
|
var invalidBlock = this.get('blocks').find(function (block) { return !block.isValid(); });
|
||||||
|
@ -50,6 +50,14 @@ define([
|
|||||||
|
|
||||||
expect(innerModel.get('styles.block.backgroundColor')).to.equal('#123456');
|
expect(innerModel.get('styles.block.backgroundColor')).to.equal('#123456');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('do not update blockDefaults.container when changed', function () {
|
||||||
|
var sandbox = sinon.sandbox.create();
|
||||||
|
var stub = sandbox.stub(EditorApplication.getConfig(), 'set');
|
||||||
|
model.trigger('change');
|
||||||
|
expect(stub.callCount).to.equal(0);
|
||||||
|
sandbox.restore();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when creating with children', function () {
|
describe('when creating with children', function () {
|
||||||
|
Reference in New Issue
Block a user