From 0f3692a62142973797adc572430e576f5f9385fa Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sun, 16 Mar 2025 20:07:17 +0100 Subject: [PATCH] Remove the dependency between the order-dependent scripting integration tests The integration tests are order-dependent because they rely on input field state set by a previous test. This commit fixes the issue by updating the values to match the initial state of the document, which makes sure that we don't build upon values from previous tests while still testing the intended logic in the individual tests like before. --- test/integration/scripting_spec.mjs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/integration/scripting_spec.mjs b/test/integration/scripting_spec.mjs index 1547674ee..f7deaadac 100644 --- a/test/integration/scripting_spec.mjs +++ b/test/integration/scripting_spec.mjs @@ -199,7 +199,7 @@ describe("Interaction", () => { `${getQuerySelector("422R")}.value === "2,72"` ); await page.waitForFunction( - `${getQuerySelector("427R")}.value === "5,86"` + `${getQuerySelector("427R")}.value === "2,72"` ); }) ); @@ -210,17 +210,13 @@ describe("Interaction", () => { pages.map(async ([browserName, page]) => { await waitForScripting(page); - await page.waitForFunction( - `${getQuerySelector("471R")}.value === "4,24"` - ); - await page.type(getSelector("436R"), "0.69314"); await page.keyboard.press("Escape"); await page.waitForFunction( `${getQuerySelector("436R")}.value === "0.69314"` ); await page.waitForFunction( - `${getQuerySelector("471R")}.value === "3,55"` + `${getQuerySelector("471R")}.value === "0,69"` ); }) ); @@ -237,7 +233,7 @@ describe("Interaction", () => { `${getQuerySelector("419R")}.value === "0.577215"` ); await page.waitForFunction( - `${getQuerySelector("427R")}.value === "6,44"` + `${getQuerySelector("427R")}.value === "0,58"` ); }) );