Seeking help with a Playwright issue related to waiting for an icon color change. My goal is to create a method using Playwright that will wait until the color of the icon changes to #8E8E90, but it seems to be not working as expected. How can I make this work correctly? Here's my current code:
async checkItemColorChanged() {
await test.step('check', async () => {
await waitUntil(
() => this.page.locator('[data-test="test"] >> svg >> path').getAttribute('fill') == '#8E8E90',
{ timeout: 4000 },
);
});
}