Skip to content

Commit

Permalink
Add visibility checks for outline in blog tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pdcp1 committed Dec 11, 2024
1 parent 0183a4f commit 715c1d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 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 @@ -84,9 +85,10 @@ test.describe('Blog', () => {
});

test('Should include outline in Spanish blog post', async ({ page, skipOnEmptyEnvironment }) => {
await page.setViewportSize({ width: 1300, height: 1000 });
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 715c1d7

Please sign in to comment.