From 5007e0ddd1541897fef7ffbf9856aa2de08c73aa Mon Sep 17 00:00:00 2001 From: Sergey Date: Thu, 27 Jun 2024 16:20:00 +0100 Subject: [PATCH] Refactoring for readability Co-authored-by: hlomzik --- web/libs/editor/tests/integration/e2e/drafts/submit.cy.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/libs/editor/tests/integration/e2e/drafts/submit.cy.ts b/web/libs/editor/tests/integration/e2e/drafts/submit.cy.ts index 612e87b7ae4..369fa247fc5 100644 --- a/web/libs/editor/tests/integration/e2e/drafts/submit.cy.ts +++ b/web/libs/editor/tests/integration/e2e/drafts/submit.cy.ts @@ -31,6 +31,9 @@ describe("Annotation submitting process", () => { `) // To have "new" annotation we need to use userGenerate .withAnnotation({ userGenerate: true, result: [] }) + .withEventListener("submitAnnotation", () => { + callApi(RESPONSE_TYPE.SUBMIT); + }) .withEventListener("submitDraft", () => { return new Promise((resolve) => { // initialize saving annotation exactly when request of saving draft should be sent to the server @@ -43,9 +46,6 @@ describe("Annotation submitting process", () => { }, RESPONSE_DELAY); }); }) - .withEventListener("submitAnnotation", () => { - callApi(RESPONSE_TYPE.SUBMIT); - }) .init(); // just to have something to save