Merge pull request #16962 from timvandermeij/fix-intermittent-bug1844576
Fix integration test "Interaction in bug1844576.pdf must check that a field has the correct formatted value"
This commit is contained in:
commit
e37e7b6f39
@ -1996,45 +1996,37 @@ describe("Interaction", () => {
|
|||||||
it("must check that a field has the correct formatted value", async () => {
|
it("must check that a field has the correct formatted value", async () => {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
pages.map(async ([browserName, page]) => {
|
pages.map(async ([browserName, page]) => {
|
||||||
const hasVisibleCanvas = await page.evaluate(_ => {
|
const hasVisibleCanvas = await page.$eval(
|
||||||
const elem = document.querySelector(
|
`[data-annotation-id="9R"] > canvas`,
|
||||||
`[data-annotation-id="9R"] > canvas`
|
elem => elem && !elem.hasAttribute("hidden")
|
||||||
);
|
);
|
||||||
return elem && !elem.hasAttribute("hidden");
|
|
||||||
});
|
|
||||||
expect(hasVisibleCanvas)
|
expect(hasVisibleCanvas)
|
||||||
.withContext(`In ${browserName}`)
|
.withContext(`In ${browserName}`)
|
||||||
.toEqual(true);
|
.toEqual(true);
|
||||||
|
|
||||||
const hasHiddenInput = await page.evaluate(_ => {
|
const hasHiddenInput = await page.$eval(
|
||||||
const elem = document.querySelector(
|
`[data-annotation-id="9R"] > input`,
|
||||||
`[data-annotation-id="9R"] > input`
|
elem => elem?.hasAttribute("hidden")
|
||||||
);
|
);
|
||||||
return elem?.hasAttribute("hidden");
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(hasHiddenInput).withContext(`In ${browserName}`).toEqual(true);
|
expect(hasHiddenInput).withContext(`In ${browserName}`).toEqual(true);
|
||||||
|
|
||||||
await page.click(getSelector("12R"));
|
await page.click(getSelector("12R"));
|
||||||
await page.waitForTimeout(10);
|
await page.waitForSelector(
|
||||||
|
`[data-annotation-id="9R"] > canvas[hidden]`
|
||||||
|
);
|
||||||
|
|
||||||
const hasHiddenCanvas = await page.evaluate(_ => {
|
const hasHiddenCanvas = await page.$eval(
|
||||||
const elem = document.querySelector(
|
`[data-annotation-id="9R"] > canvas`,
|
||||||
`[data-annotation-id="9R"] > canvas`
|
elem => elem?.hasAttribute("hidden")
|
||||||
);
|
);
|
||||||
return elem?.hasAttribute("hidden");
|
|
||||||
});
|
|
||||||
expect(hasHiddenCanvas)
|
expect(hasHiddenCanvas)
|
||||||
.withContext(`In ${browserName}`)
|
.withContext(`In ${browserName}`)
|
||||||
.toEqual(true);
|
.toEqual(true);
|
||||||
|
|
||||||
const hasVisibleInput = await page.evaluate(_ => {
|
const hasVisibleInput = await page.$eval(
|
||||||
const elem = document.querySelector(
|
`[data-annotation-id="9R"] > input`,
|
||||||
`[data-annotation-id="9R"] > input`
|
elem => elem && !elem.hasAttribute("hidden")
|
||||||
);
|
);
|
||||||
return elem && !elem.hasAttribute("hidden");
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(hasVisibleInput)
|
expect(hasVisibleInput)
|
||||||
.withContext(`In ${browserName}`)
|
.withContext(`In ${browserName}`)
|
||||||
.toEqual(true);
|
.toEqual(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user