From f3d296b00dfbe5a21109725e92483ff7c07d6179 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 09:24:23 +0000 Subject: [PATCH] test: add validation for favicon and manifest tags Added a comprehensive Playwright test in `tests/seo.spec.ts` to ensure the correct presence and expected `href` values of `manifest`, `apple-touch-icon`, `icon` (various sizes), `mask-icon`, and `shortcut icon` tags. Co-authored-by: xRahul <1639945+xRahul@users.noreply.github.com> --- tests/seo.spec.ts | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/tests/seo.spec.ts b/tests/seo.spec.ts index 7758aec9..a1eeb3e5 100644 --- a/tests/seo.spec.ts +++ b/tests/seo.spec.ts @@ -59,3 +59,46 @@ test('has opengraph and twitter meta tags', async ({ page }) => { ), ]); }); + +test('has favicon and manifest tags', async ({ page }) => { + await page.goto('/'); + + await Promise.all([ + expect(page.locator('link[rel="manifest"]')).toHaveAttribute( + 'href', + '/manifest.json' + ), + expect(page.locator('link[rel="apple-touch-icon"]')).toHaveAttribute( + 'href', + '/assets/favicons/apple-touch-icon.png' + ), + expect(page.locator('link[rel="icon"][sizes="16x16"]')).toHaveAttribute( + 'href', + '/assets/favicons/favicon-16x16.png' + ), + expect(page.locator('link[rel="icon"][sizes="32x32"]')).toHaveAttribute( + 'href', + '/assets/favicons/favicon-32x32.png' + ), + expect(page.locator('link[rel="icon"][sizes="96x96"]')).toHaveAttribute( + 'href', + '/assets/favicons/favicon-96x96.png' + ), + expect(page.locator('link[rel="icon"][sizes="128x128"]')).toHaveAttribute( + 'href', + '/assets/favicons/favicon-128.png' + ), + expect(page.locator('link[rel="icon"][sizes="192x192"]')).toHaveAttribute( + 'href', + '/assets/favicons/android-chrome-192x192.png' + ), + expect(page.locator('link[rel="mask-icon"]')).toHaveAttribute( + 'href', + '/assets/favicons/safari-pinned-tab.svg' + ), + expect(page.locator('link[rel="shortcut icon"]')).toHaveAttribute( + 'href', + '/assets/favicons/favicon.ico' + ), + ]); +});