From 9bd46f41bf830686c1c906c0ade121f414bf9614 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:27:11 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A7=AA=20[testing=20improvement]=20Ad?= =?UTF-8?q?d=20validation=20for=20swap=20animation=20text=20elements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added Playwright assertions to verify that exactly five span elements exist within the swap animation container and contain the expected text values. Co-authored-by: xRahul <1639945+xRahul@users.noreply.github.com> --- tests/animation-verification.spec.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/animation-verification.spec.ts b/tests/animation-verification.spec.ts index 7123470d..f455babe 100644 --- a/tests/animation-verification.spec.ts +++ b/tests/animation-verification.spec.ts @@ -7,11 +7,17 @@ test('animation container and items exist', async ({ page }) => { const container = page.locator('.swap-animation'); await expect(container).toBeVisible(); - // Initially, before changes, checking for "Software Engineer" text - // The current implementation uses ::before, so the text might be in the display-none span - // or just invisible. - // We just want to ensure the page loads and the container is there. - // After changes, we expect 5 spans. - // For now, let's just verify the container is present. + const spans = container.locator('span'); + await expect(spans).toHaveCount(5); + + const expectedTexts = [ + 'Software Engineer', + 'Avid Reader', + 'Tech Enthusiast', + 'Gamer', + 'Amateur Guitarist', + ]; + + await expect(spans).toHaveText(expectedTexts); }); From 4bc9a4b45140b3573078fbcf16a4c633621d53c6 Mon Sep 17 00:00:00 2001 From: xRahul <1639945+xRahul@users.noreply.github.com> Date: Mon, 27 Apr 2026 13:26:16 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A7=AA=20[testing=20improvement]=20Ad?= =?UTF-8?q?d=20validation=20for=20swap=20animation=20text=20elements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added Playwright assertions to verify that exactly five span elements exist within the swap animation container and contain the expected text values. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> --- src/style.css | 4 ---- tests/benchmark.spec.ts | 2 -- tests/e2e.spec.ts | 8 +++----- tests/seo.spec.ts | 43 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 11 deletions(-) diff --git a/src/style.css b/src/style.css index c09e4315..9daaad12 100644 --- a/src/style.css +++ b/src/style.css @@ -82,10 +82,6 @@ body, will-change: transform; } -.display-none { - display: none; -} - @keyframes flip { 0% { transform: rotateY(360deg); diff --git a/tests/benchmark.spec.ts b/tests/benchmark.spec.ts index 3ce034b6..3d661e70 100644 --- a/tests/benchmark.spec.ts +++ b/tests/benchmark.spec.ts @@ -31,6 +31,4 @@ test('measure fps of flip animation', async ({ page }) => { }); }); }); - - console.log(`Average FPS: ${fps.toFixed(2)}`); }); diff --git a/tests/e2e.spec.ts b/tests/e2e.spec.ts index e237e7f5..03ce7b88 100644 --- a/tests/e2e.spec.ts +++ b/tests/e2e.spec.ts @@ -1,22 +1,20 @@ import { test, expect } from '@playwright/test'; -test('has title', async ({ page }) => { +test.beforeEach(async ({ page }) => { await page.goto('/'); +}); +test('has title', async ({ page }) => { // Expect a title "to contain" a substring. await expect(page).toHaveTitle(/Rahul Jain/); }); test('has main heading', async ({ page }) => { - await page.goto('/'); - // Expect the main heading to be visible await expect(page.locator('h1.title')).toBeVisible(); }); test('has social links', async ({ page }) => { - await page.goto('/'); - // Check for social links await Promise.all([ expect(page.getByLabel('Stack Overflow')).toBeVisible(), 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' + ), + ]); +});