You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// in a plugin test
import { expect } from "chai";
import { setData as setModelData } from "@ckeditor/ckeditor5-engine/src/dev-utils/model";
let editor;
...
editor.model.document.registerPostFixer(writer => {
expect(writer.batch.type).to.equal("transparent");
});
setModelData(editor.model, "<paragraph>Some data</paragraph>", { batchType: "transparent" });
✔️ Expected result
What is the expected result of the above steps?
The above assertion is true
❌ Actual result
What is the actual result of the above steps?
The above assertion is false
📃 Other details
Browser: …
OS: …
CKEditor version: …
Installed CKEditor plugins: …
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered:
It seems that an old PR (ckeditor/ckeditor5-engine#1431) has removed the ability to use the
batchType
option insetData
in https://github.com/ckeditor/ckeditor5/blob/v21.0.0/packages/ckeditor5-engine/src/dev-utils/model.js#L108. It seems thatsetData
used to usemodel.enqueueChange
which supports specifying the batch, but this was changed in the aforementioned PR.It would be very useful for writing tests if we could use this option. But if this change was intentional, please update the documentation (https://ckeditor.com/docs/ckeditor5/latest/api/module_engine_dev-utils_model.html#function-setData) which still lists
batchType
as an option.📝 Provide detailed reproduction steps (if any)
✔️ Expected result
What is the expected result of the above steps?
The above assertion is true
❌ Actual result
What is the actual result of the above steps?
The above assertion is false
📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: