From ab6ca6ffc215da656574ba50706addcd594cca30 Mon Sep 17 00:00:00 2001 From: CJ Coffey Date: Mon, 23 Dec 2024 11:02:59 -0500 Subject: [PATCH] test: assert that posts that should not be visible are not visible --- tests/app.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/app.spec.ts b/tests/app.spec.ts index 7e2b5f7..4b7ce95 100644 --- a/tests/app.spec.ts +++ b/tests/app.spec.ts @@ -13,5 +13,6 @@ test('test', async ({ page }) => { await expect(page.getByPlaceholder('Search')).toBeVisible(); await page.getByPlaceholder('Search').click(); await page.getByPlaceholder('Search').fill('devlog'); - await expect(page.locator('a').filter({ hasText: 'Dev Log Series Part 3 2023-11' })).toBeVisible(); + await expect(page.locator('h2').filter({ hasText: 'Dev Log Series Part 3' })).toBeVisible(); + await expect(page.locator('h2').filter({ hasText: 'FIRST' })).not.toBeVisible(); });