more stable way to assert the text (#33811)

fixes: #33810

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-10-11 17:32:06 +02:00 committed by GitHub
parent 268229dbe8
commit 98a6ddead0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -57,7 +57,7 @@ test.describe("My resources page", () => {
await page.getByTestId("resources").click(); await page.getByTestId("resources").click();
await page.getByTestId("sharedWithMe").click(); await page.getByTestId("sharedWithMe").click();
const rowData = await page.getByTestId("row[0].name").allTextContents(); const rowData = page.getByTestId("row[0].name");
expect(rowData).toEqual(["one"]); await expect(rowData).toHaveText("one");
}); });
}); });