From 06fa76cec6b775c94971f5e09aedbf09072f2efc Mon Sep 17 00:00:00 2001 From: matthewp Date: Fri, 11 Aug 2023 17:57:40 +0000 Subject: [PATCH] [ci] format --- packages/astro/components/ViewTransitions.astro | 3 +-- packages/astro/e2e/view-transitions.test.js | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/astro/components/ViewTransitions.astro b/packages/astro/components/ViewTransitions.astro index 8e233d182..05fc57aa6 100644 --- a/packages/astro/components/ViewTransitions.astro +++ b/packages/astro/components/ViewTransitions.astro @@ -265,8 +265,7 @@ const { fallback = 'animate' } = Astro.props as Props; link.origin === location.origin && !( // Same page means same path and same query params - location.pathname === link.pathname && - location.search === link.search + (location.pathname === link.pathname && location.search === link.search) ) && ev.button === 0 && // left clicks only !ev.metaKey && // new tab (mac) diff --git a/packages/astro/e2e/view-transitions.test.js b/packages/astro/e2e/view-transitions.test.js index d9425118d..7aeb6502a 100644 --- a/packages/astro/e2e/view-transitions.test.js +++ b/packages/astro/e2e/view-transitions.test.js @@ -295,7 +295,10 @@ test.describe('View Transitions', () => { await expect(meta).toHaveAttribute('content', '0'); }); - test('Navigating to the same path but with different query params should result in transition', async ({ page, astro }) => { + test('Navigating to the same path but with different query params should result in transition', async ({ + page, + astro, + }) => { const loads = []; page.addListener('load', (p) => { loads.push(p.title()); @@ -311,7 +314,6 @@ test.describe('View Transitions', () => { p = page.locator('#query-page'); await expect(p, 'should have content').toHaveText('Page 2'); - await expect(loads.length, 'There should only be 1 page load').toEqual(1); }); });