Skip to content

Commit

Permalink
Fix blog post test (#3276)
Browse files Browse the repository at this point in the history
* Increase viewport on Blog post test

* Add visibility checks for outline in blog tests
  • Loading branch information
pdcp1 authored Dec 11, 2024
1 parent 97c647f commit 93012b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions site/gatsby-site/playwright/e2e/blog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand Down

0 comments on commit 93012b5

Please sign in to comment.