Skip to content

Commit 88ea60d

Browse files
Merge pull request #18624 from timvandermeij/intermittent-scripting-siblings
Fix the "must check that a value is correctly updated on a field and its siblings" scripting integration test
2 parents 79dce53 + 5cc77d3 commit 88ea60d

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

test/integration/scripting_spec.mjs

+3-14
Original file line numberDiff line numberDiff line change
@@ -1494,36 +1494,25 @@ describe("Interaction", () => {
14941494
await closePages(pages);
14951495
});
14961496

1497-
it("must check that a values is correctly updated on a field and its siblings", async () => {
1497+
it("must check that a value is correctly updated on a field and its siblings", async () => {
14981498
await Promise.all(
14991499
pages.map(async ([browserName, page]) => {
15001500
await waitForScripting(page);
15011501

15021502
await clearInput(page, getSelector("39R"));
15031503
await page.type(getSelector("39R"), "123", { delay: 10 });
15041504

1505-
const prevTotal = await page.$eval(
1506-
getSelector("43R"),
1507-
el => el.value
1508-
);
1509-
15101505
await clearInput(page, getSelector("42R"));
15111506
await page.type(getSelector("42R"), "456", { delay: 10 });
15121507

15131508
await page.click(getSelector("45R"));
15141509

15151510
await page.waitForFunction(
1516-
`${getQuerySelector("43R")}.value !== "${prevTotal}"`
1511+
`${getQuerySelector("43R")}.value === "579.00"`
15171512
);
15181513
await page.waitForFunction(
1519-
`${getQuerySelector("46R")}.value !== "${prevTotal}"`
1514+
`${getQuerySelector("46R")}.value === "579.00"`
15201515
);
1521-
1522-
let total = await page.$eval(getSelector("43R"), el => el.value);
1523-
expect(total).withContext(`In ${browserName}`).toEqual("579.00");
1524-
1525-
total = await page.$eval(getSelector("46R"), el => el.value);
1526-
expect(total).withContext(`In ${browserName}`).toEqual("579.00");
15271516
})
15281517
);
15291518
});

0 commit comments

Comments
 (0)