Skip to content

Commit b96e9e5

Browse files
committed
Added one more test
1 parent 226020d commit b96e9e5

File tree

2 files changed

+125
-0
lines changed

2 files changed

+125
-0
lines changed

packages/xl-multi-column/src/test/commands/__snapshots__/removeBlocks.test.ts.snap

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,125 @@ exports[`Test removeBlocks > Remove all blocks in columns 1`] = `
204204
]
205205
`;
206206

207+
exports[`Test removeBlocks > Remove all blocks in second column 1`] = `
208+
[
209+
{
210+
"children": [
211+
{
212+
"children": [],
213+
"content": [
214+
{
215+
"styles": {},
216+
"text": "Nested Paragraph 0",
217+
"type": "text",
218+
},
219+
],
220+
"id": "nested-paragraph-0",
221+
"props": {
222+
"backgroundColor": "default",
223+
"textAlignment": "left",
224+
"textColor": "default",
225+
},
226+
"type": "paragraph",
227+
},
228+
],
229+
"content": [
230+
{
231+
"styles": {},
232+
"text": "Paragraph 0",
233+
"type": "text",
234+
},
235+
],
236+
"id": "paragraph-0",
237+
"props": {
238+
"backgroundColor": "default",
239+
"textAlignment": "left",
240+
"textColor": "default",
241+
},
242+
"type": "paragraph",
243+
},
244+
{
245+
"children": [],
246+
"content": [
247+
{
248+
"styles": {},
249+
"text": "Paragraph 1",
250+
"type": "text",
251+
},
252+
],
253+
"id": "paragraph-1",
254+
"props": {
255+
"backgroundColor": "default",
256+
"textAlignment": "left",
257+
"textColor": "default",
258+
},
259+
"type": "paragraph",
260+
},
261+
{
262+
"children": [],
263+
"content": [
264+
{
265+
"styles": {},
266+
"text": "Column Paragraph 0",
267+
"type": "text",
268+
},
269+
],
270+
"id": "column-paragraph-0",
271+
"props": {
272+
"backgroundColor": "default",
273+
"textAlignment": "left",
274+
"textColor": "default",
275+
},
276+
"type": "paragraph",
277+
},
278+
{
279+
"children": [],
280+
"content": [
281+
{
282+
"styles": {},
283+
"text": "Column Paragraph 1",
284+
"type": "text",
285+
},
286+
],
287+
"id": "column-paragraph-1",
288+
"props": {
289+
"backgroundColor": "default",
290+
"textAlignment": "left",
291+
"textColor": "default",
292+
},
293+
"type": "paragraph",
294+
},
295+
{
296+
"children": [],
297+
"content": [
298+
{
299+
"styles": {},
300+
"text": "Paragraph 2",
301+
"type": "text",
302+
},
303+
],
304+
"id": "paragraph-2",
305+
"props": {
306+
"backgroundColor": "default",
307+
"textAlignment": "left",
308+
"textColor": "default",
309+
},
310+
"type": "paragraph",
311+
},
312+
{
313+
"children": [],
314+
"content": [],
315+
"id": "trailing-paragraph",
316+
"props": {
317+
"backgroundColor": "default",
318+
"textAlignment": "left",
319+
"textColor": "default",
320+
},
321+
"type": "paragraph",
322+
},
323+
]
324+
`;
325+
207326
exports[`Test removeBlocks > Remove all columns in columnList 1`] = `
208327
[
209328
{

packages/xl-multi-column/src/test/commands/removeBlocks.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ describe("Test removeBlocks", () => {
1111
expect(getEditor().document).toMatchSnapshot();
1212
});
1313

14+
it("Remove all blocks in second column", () => {
15+
getEditor().removeBlocks(["column-paragraph-2", "column-paragraph-3"]);
16+
17+
expect(getEditor().document).toMatchSnapshot();
18+
});
19+
1420
it("Remove all blocks in columns", () => {
1521
getEditor().removeBlocks([
1622
"column-paragraph-0",

0 commit comments

Comments
 (0)