mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-21 02:34:11 +08:00
tests: improve playwright test readability (#5149)
This commit is contained in:
@@ -95,7 +95,7 @@ test.describe("Status Page", () => {
|
||||
await expect(page.getByTestId("powered-by")).toHaveCount(0);
|
||||
|
||||
await expect(page.getByTestId("update-countdown-text")).toContainText("00:");
|
||||
const updateCountdown = Number((await page.getByTestId("update-countdown-text").textContent()).match(/(\d+):(\d+)/)[2]) ;
|
||||
const updateCountdown = Number((await page.getByTestId("update-countdown-text").textContent()).match(/(\d+):(\d+)/)[2]);
|
||||
expect(updateCountdown).toBeGreaterThanOrEqual(refreshInterval); // cant be certain when the timer will start, so ensure it's within expected range
|
||||
expect(updateCountdown).toBeLessThanOrEqual(refreshInterval + 10);
|
||||
|
||||
|
Reference in New Issue
Block a user