Merge branch 'main' into feat/extra-window

This commit is contained in:
SiriusXT
2026-01-05 11:28:47 +08:00
37 changed files with 432 additions and 2128 deletions

View File

@@ -70,6 +70,20 @@ test("Attachments listing works", async ({ page, context }) => {
await expect(attachmentsList.locator(".pdf-attachment-item")).toHaveCount(0);
});
test("Download original PDF works", async ({ page, context }) => {
const app = new App(page, context);
await app.goto();
await app.goToNoteInNewTab("Dacia Logan.pdf");
const pdfHelper = new PdfHelper(app);
await pdfHelper.toBeInitialized();
const [ download ] = await Promise.all([
page.waitForEvent("download"),
app.currentNoteSplit.locator(".icon-action.bx.bx-download").click()
]);
expect(download).toBeDefined();
});
test("Layers listing works", async ({ page, context }) => {
const app = new App(page, context);
await app.goto();
@@ -108,4 +122,8 @@ class PdfHelper {
async expectPageToBe(expectedPageNumber: number) {
await expect(this.contentFrame.locator("#pageNumber")).toHaveValue(`${expectedPageNumber}`);
}
async toBeInitialized() {
await expect(this.contentFrame.locator("#pageNumber")).toBeVisible();
}
}