Skip to content

Commit 0f3692a

Browse files
committed
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.
1 parent 334d681 commit 0f3692a

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

test/integration/scripting_spec.mjs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ describe("Interaction", () => {
199199
`${getQuerySelector("422R")}.value === "2,72"`
200200
);
201201
await page.waitForFunction(
202-
`${getQuerySelector("427R")}.value === "5,86"`
202+
`${getQuerySelector("427R")}.value === "2,72"`
203203
);
204204
})
205205
);
@@ -210,17 +210,13 @@ describe("Interaction", () => {
210210
pages.map(async ([browserName, page]) => {
211211
await waitForScripting(page);
212212

213-
await page.waitForFunction(
214-
`${getQuerySelector("471R")}.value === "4,24"`
215-
);
216-
217213
await page.type(getSelector("436R"), "0.69314");
218214
await page.keyboard.press("Escape");
219215
await page.waitForFunction(
220216
`${getQuerySelector("436R")}.value === "0.69314"`
221217
);
222218
await page.waitForFunction(
223-
`${getQuerySelector("471R")}.value === "3,55"`
219+
`${getQuerySelector("471R")}.value === "0,69"`
224220
);
225221
})
226222
);
@@ -237,7 +233,7 @@ describe("Interaction", () => {
237233
`${getQuerySelector("419R")}.value === "0.577215"`
238234
);
239235
await page.waitForFunction(
240-
`${getQuerySelector("427R")}.value === "6,44"`
236+
`${getQuerySelector("427R")}.value === "0,58"`
241237
);
242238
})
243239
);

0 commit comments

Comments
 (0)