Fix a 'FreeText accessibility' integration test

It's a regression from #20624.
This commit is contained in:
Calixte Denizet 2026-02-09 10:14:21 +01:00
parent babd030a77
commit 0f9d20fa32
No known key found for this signature in database
GPG Key ID: 0C5442631EE0691F

View File

@ -2404,11 +2404,12 @@ describe("FreeText Editor", () => {
await switchToFreeText(page);
const parentId = "p3R_mc8";
await page.waitForSelector(`#${parentId}`);
const rect = await page.evaluate(id => {
const parent = document.getElementById(id);
let span = null;
for (const child of parent.childNodes) {
if (child.innerText === "000.[5]") {
if (child.innerText.endsWith("000.[5]")) {
span = child;
break;
}