From 93012b57820caa7a5246a2f1bc4bcc3fbeee4f62 Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Wed, 11 Dec 2024 18:55:10 -0300 Subject: [PATCH] Fix blog post test (#3276) * Increase viewport on Blog post test * Add visibility checks for outline in blog tests --- site/gatsby-site/playwright/e2e/blog.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/gatsby-site/playwright/e2e/blog.spec.ts b/site/gatsby-site/playwright/e2e/blog.spec.ts index 42d384a7d1..30fcd4817a 100644 --- a/site/gatsby-site/playwright/e2e/blog.spec.ts +++ b/site/gatsby-site/playwright/e2e/blog.spec.ts @@ -67,6 +67,7 @@ test.describe('Blog', () => { await page.setViewportSize({ width: 1280, height: 1000 }); await page.goto('/blog/the-first-taxonomy-of-ai-incidents'); + await expect(page.locator('[data-cy="outline"]')).toBeVisible(); const outlineItems = page.locator('[data-cy="outline"] > li'); await expect(outlineItems).toHaveCount(5); @@ -87,6 +88,7 @@ test.describe('Blog', () => { await page.setViewportSize({ width: 1280, height: 1000 }); 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);