diff --git a/__tests__/e2e/articles/redirect.test.ts b/__tests__/e2e/articles/redirect.test.ts index 4d314bb..97764d5 100644 --- a/__tests__/e2e/articles/redirect.test.ts +++ b/__tests__/e2e/articles/redirect.test.ts @@ -14,11 +14,15 @@ test.describe('Article - Redirect', () => { await expect(page.locator('meta[property="og:site_name"]')).toHaveAttribute('content', 'E2E Test Site'); await expect(page.locator('meta[property="og:locale"]')).toHaveAttribute('content', 'ja_JP'); await expect(page.locator('meta[property="og:image"]')).toHaveAttribute('content', 'defaultImage.jpg'); - await expect(page.locator('meta[name="injectedMetaName"]')).toHaveAttribute('content', 'injectedMetaContent'); - await expect(page.locator('meta[name="robots"]')).toHaveAttribute('content', 'noarchive, nofollow, noimageindex, noindex'); + await expect(page.locator('meta[name="injectedMetaName"]')).toHaveAttribute('content', 'http://localhost:3000/defaultImage.jpg'); + await expect(page.locator('meta[name="description"]')).toHaveAttribute('content', 'Proin tellus nibh, pretium vitae bibendum in, tempus nec odio...'); await expect(page.locator('meta[property="og:description"]')).toHaveAttribute('content', 'Proin tellus nibh, pretium vitae bibendum in, tempus nec odio...'); + const robots = await page.locator('meta[name="robots"]').getAttribute('content'); + const sortedRobots = robots.split(',').sort().map(r => r.trim()); + expect(sortedRobots.join(', ')).toBe('noarchive, nofollow, noimageindex, noindex'); + // TODO: assert content value await expect(page.locator('meta[property="article:published_time"]')).toHaveAttribute('content'); await expect(page.locator('meta[property="article:modified_time"]')).toHaveAttribute('content');