mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Correctly wait for the editor mode when double clicking on an annotation in integration tests
This commit is contained in:
parent
11ce57ac22
commit
3ac55501e9
2 changed files with 17 additions and 5 deletions
|
@ -40,6 +40,7 @@ import {
|
|||
serializeBitmapDimensions,
|
||||
switchToEditor,
|
||||
waitForAnnotationEditorLayer,
|
||||
waitForAnnotationModeChanged,
|
||||
waitForEntryInStorage,
|
||||
waitForSelectedEditor,
|
||||
waitForSerialized,
|
||||
|
@ -1437,7 +1438,9 @@ describe("Stamp Editor", () => {
|
|||
it("must move an annotation", async () => {
|
||||
await Promise.all(
|
||||
pages.map(async ([browserName, page]) => {
|
||||
const modeChangedHandle = await waitForAnnotationModeChanged(page);
|
||||
await page.click(getAnnotationSelector("25R"), { count: 2 });
|
||||
await awaitPromise(modeChangedHandle);
|
||||
await waitForSelectedEditor(page, getEditorSelector(0));
|
||||
|
||||
const editorIds = await getEditors(page, "stamp");
|
||||
|
@ -1484,7 +1487,9 @@ describe("Stamp Editor", () => {
|
|||
it("must update an existing alt-text", async () => {
|
||||
await Promise.all(
|
||||
pages.map(async ([browserName, page]) => {
|
||||
const modeChangedHandle = await waitForAnnotationModeChanged(page);
|
||||
await page.click(getAnnotationSelector("58R"), { count: 2 });
|
||||
await awaitPromise(modeChangedHandle);
|
||||
await waitForSelectedEditor(page, getEditorSelector(4));
|
||||
|
||||
const editorIds = await getEditors(page, "stamp");
|
||||
|
@ -1541,7 +1546,9 @@ describe("Stamp Editor", () => {
|
|||
it("must check that the annotation is correctly restored", async () => {
|
||||
await Promise.all(
|
||||
pages.map(async ([browserName, page]) => {
|
||||
const modeChangedHandle = await waitForAnnotationModeChanged(page);
|
||||
await page.click(getAnnotationSelector("37R"), { count: 2 });
|
||||
await awaitPromise(modeChangedHandle);
|
||||
const editorSelector = getEditorSelector(2);
|
||||
await waitForSelectedEditor(page, editorSelector);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue