diff --git a/e2e/signature-actions.spec.ts b/e2e/signature-actions.spec.ts index e305459..078b0f9 100644 --- a/e2e/signature-actions.spec.ts +++ b/e2e/signature-actions.spec.ts @@ -57,3 +57,15 @@ test("zoom a pdf element", async({page})=> { await expect(page.locator(".signature-box")).toHaveCount(1) expect(after.x).not.toBe(before.y); }) + +test("duplicates a signature element", async ({ page }) => { + const original = await page.locator(".signature-box").boundingBox(); + await page.getByTitle("Duplicate").click(); + await expect(page.locator(".signature-box")).toHaveCount(2); + + const copy = await page.locator(".signature-box").nth(1).boundingBox(); + expect(copy.width).toBe(original.width); + expect(copy.height).toBe(original.height); + expect(copy.x).toBeGreaterThan(original.x); + expect(copy.y).toBeGreaterThan(original.y); +}) diff --git a/examples/basic/App.vue b/examples/basic/App.vue index 15df9bc..fc8efcd 100644 --- a/examples/basic/App.vue +++ b/examples/basic/App.vue @@ -41,7 +41,8 @@ SPDX-License-Identifier: AGPL-3.0-or-later /> -