1
0
mirror of https://github.com/24eme/signaturepdf.git synced 2023-08-25 09:33:08 +02:00

Test pour garder la séléction active

This commit is contained in:
Vincent LAURENT 2021-10-30 01:21:47 +02:00
parent dde4519ef5
commit 56991f0748

View File

@ -77,6 +77,14 @@ describe("Signature d'un pdf", () => {
expect(await page.evaluate(() => { return Math.round(canvasEditions[0].getObjects()[0].getScaledHeight())})).toBe(150);
expect(await page.evaluate(() => { return Math.round(canvasEditions[0].getObjects()[0].getScaledWidth())})).toBe(150);
});
it("Garder la séléction active", async () => {
expect(await page.evaluate(() => { return document.querySelector('#add-lock-checkbox').checked; })).toBe(false);
await page.click("#label_svg_0", {clickCount: 2});
expect(await page.evaluate(() => { return document.querySelector('#add-lock-checkbox').checked; })).toBe(true);
await page.click("#label_svg_0");
expect(await page.evaluate(() => { return document.querySelector('#add-lock-checkbox').checked; })).toBe(false);
expect(await page.evaluate(() => { return document.querySelector('#radio_svg_0').checked; })).toBe(false);
});
it("Ajout d'une seconde signature", async () => {
await page.click("#label_svg_0");
expect(await page.evaluate(() => { return document.body.style.cursor; })).toBe("copy");