Skip to content

Commit cd9415c

Browse files
committed
chore(test): google slides created tables with merged cells
1 parent 5a169e0 commit cd9415c

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import Automizer, { modify } from '../src/index';
2+
3+
test('modify a table created with google slides, create text elements.', async () => {
4+
const automizer = new Automizer({
5+
templateDir: `${__dirname}/pptx-templates`,
6+
outputDir: `${__dirname}/pptx-output`,
7+
});
8+
9+
const data1 = {
10+
body: [
11+
{ values: ['', '', '', '', ''] },
12+
{ values: ['', '', '', '', ''] },
13+
{ values: ['', '', '', '', ''] },
14+
],
15+
};
16+
17+
const pres = automizer
18+
.loadRoot(`RootTemplate.pptx`)
19+
.load(`GS_Tables_Merged.pptx`, 'tables');
20+
21+
const result = await pres
22+
.addSlide('tables', 4, (slide) => {
23+
slide.modifyElement('Google Shape;69;p16', [
24+
modify.setTable(data1),
25+
// modify.dump
26+
]);
27+
})
28+
.write(`modify-existing-table-google-slides.test.pptx`);
29+
30+
// expect(result.tables).toBe(2); // tbd
31+
});
40.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)