summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2023-08-11 17:57:40 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2023-08-11 17:57:40 +0000
commit06fa76cec6b775c94971f5e09aedbf09072f2efc (patch)
tree3170a7aea7b8130d89a7bf04f18e0261f30495b1
parent4a145c4c7d176a3fb56342844690c6999e880069 (diff)
downloadastro-06fa76cec6b775c94971f5e09aedbf09072f2efc.tar.gz
astro-06fa76cec6b775c94971f5e09aedbf09072f2efc.tar.zst
astro-06fa76cec6b775c94971f5e09aedbf09072f2efc.zip
[ci] format
-rw-r--r--packages/astro/components/ViewTransitions.astro3
-rw-r--r--packages/astro/e2e/view-transitions.test.js6
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);
});
});