diff --git a/src/tests/functional/stream_tests.ts b/src/tests/functional/stream_tests.ts index a8b6a644f..3d159b2e3 100644 --- a/src/tests/functional/stream_tests.ts +++ b/src/tests/functional/stream_tests.ts @@ -1,6 +1,6 @@ import { test } from "@playwright/test" import { assert } from "chai" -import { nextBeat, nextEventNamed, readEventLogs } from "../helpers/page" +import { nextBeat, nextEventNamed, readEventLogs, waitUntilNoSelector, waitUntilText } from "../helpers/page" test.beforeEach(async ({ page }) => { await page.goto("/src/tests/fixtures/stream.html") @@ -50,12 +50,10 @@ test("test receiving a message without a template", async ({ page }) => { `) ) - assert.equal(await page.locator("#messages").count(), 0, "removes target element") + assert.notOk(await waitUntilNoSelector(page, "#messages"), "removes target element") }) test("test receiving a message with a