Release Office Tools 0.2.0
Verify / verify (push) Canceled after 0s

This commit is contained in:
2026-09-02 07:32:31 +02:00
parent a5524e27e3
commit 08b8f84f7b
50 changed files with 2196 additions and 165 deletions
+20 -2
View File
@@ -23,15 +23,33 @@ describe("UploadWorkbench", () => {
const user = userEvent.setup();
render(<UploadWorkbench />);
const input = screen.getByLabelText("Open office file");
const file = new File(["local fixture"], "report.docx", {
const bytes = new Uint8Array(13);
bytes.set([0x50, 0x4b, 0x03, 0x04]);
const file = new File([bytes], "report.docx", {
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
});
await user.upload(input, file);
const heading = screen.getByRole("region", { name: "report.docx" });
const heading = await screen.findByRole("region", { name: "report.docx" });
expect(heading).toHaveTextContent("report.docx");
expect(heading).toHaveTextContent("13 B");
expect(screen.getByLabelText("Test OOXML viewer")).toBeInTheDocument();
expect(
screen.getByRole("button", { name: "Save exact copy" }),
).toBeVisible();
});
it("explains a renamed legacy compound-binary file", async () => {
const user = userEvent.setup();
render(<UploadWorkbench />);
const file = new File(
[Uint8Array.from([0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1])],
"renamed.docx",
);
await user.upload(screen.getByLabelText("Open office file"), file);
expect(await screen.findByRole("alert")).toHaveTextContent(
"legacy OLE Compound File",
);
});
});