Cover QPowerPoint speaker notes export
This commit is contained in:
@@ -201,6 +201,29 @@ describe("powerPointOffice helpers", () => {
|
||||
expect(mediaFiles.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
it("экспортирует заметки докладчика в PPTX notesSlide relationships", async () => {
|
||||
const blob = await exportPptxBlob({
|
||||
title: "Заметки.pptx",
|
||||
slides: [
|
||||
{
|
||||
id: "slide-1",
|
||||
title: "Слайд с заметками",
|
||||
subtitle: "Проверка экспорта",
|
||||
notes: "Первый тезис\nВторой тезис",
|
||||
theme: "classic"
|
||||
}
|
||||
]
|
||||
});
|
||||
const zip = await JSZip.loadAsync(await blob.arrayBuffer());
|
||||
const relationshipsXml = await zip.file("ppt/slides/_rels/slide1.xml.rels")?.async("string");
|
||||
const notesPath = Object.keys(zip.files).find((path) => path.startsWith("ppt/notesSlides/notesSlide") && path.endsWith(".xml"));
|
||||
const notesXml = notesPath ? await zip.file(notesPath)?.async("string") : "";
|
||||
|
||||
expect(relationshipsXml).toContain('Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide"');
|
||||
expect(notesXml).toContain("Первый тезис");
|
||||
expect(notesXml).toContain("Второй тезис");
|
||||
});
|
||||
|
||||
it("импортирует и экспортирует пользовательский цвет фона слайда", async () => {
|
||||
const zip = new JSZip();
|
||||
zip.file(
|
||||
|
||||
Reference in New Issue
Block a user