From 05b7f1cf9cd1fb5db78690a2ec5274f628df6d6a Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Wed, 11 Dec 2024 19:47:39 -0300 Subject: [PATCH] Fix/blog post test (#3277) * Increase viewport on Blog post test * Add visibility checks for outline in blog tests * Change blog tests to check for specific outline item count --- site/gatsby-site/playwright/e2e/blog.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/gatsby-site/playwright/e2e/blog.spec.ts b/site/gatsby-site/playwright/e2e/blog.spec.ts index 30fcd4817a..db828da5cd 100644 --- a/site/gatsby-site/playwright/e2e/blog.spec.ts +++ b/site/gatsby-site/playwright/e2e/blog.spec.ts @@ -89,8 +89,8 @@ test.describe('Blog', () => { await page.goto('/es/blog/multilingual-incident-reporting'); await expect(page.locator('[data-cy="outline"]')).toBeVisible(); - const outlineItemsCount = await page.locator('[data-cy="outline"] > li').count(); - await expect(outlineItemsCount).toBeGreaterThanOrEqual(3); + const outlineItems = page.locator('[data-cy="outline"] > li'); + await expect(outlineItems).toHaveCount(4); await expect(page.locator('[data-cy="outline"]:has-text("¿Como funciona?")')).toBeVisible(); await expect(page.locator('[data-cy="outline"]:has-text("Llamado a la acción")')).toBeVisible();