[ci] format
This commit is contained in:
parent
4a145c4c7d
commit
06fa76cec6
2 changed files with 5 additions and 4 deletions
|
@ -265,8 +265,7 @@ const { fallback = 'animate' } = Astro.props as Props;
|
||||||
link.origin === location.origin &&
|
link.origin === location.origin &&
|
||||||
!(
|
!(
|
||||||
// Same page means same path and same query params
|
// Same page means same path and same query params
|
||||||
location.pathname === link.pathname &&
|
(location.pathname === link.pathname && location.search === link.search)
|
||||||
location.search === link.search
|
|
||||||
) &&
|
) &&
|
||||||
ev.button === 0 && // left clicks only
|
ev.button === 0 && // left clicks only
|
||||||
!ev.metaKey && // new tab (mac)
|
!ev.metaKey && // new tab (mac)
|
||||||
|
|
|
@ -295,7 +295,10 @@ test.describe('View Transitions', () => {
|
||||||
await expect(meta).toHaveAttribute('content', '0');
|
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 = [];
|
const loads = [];
|
||||||
page.addListener('load', (p) => {
|
page.addListener('load', (p) => {
|
||||||
loads.push(p.title());
|
loads.push(p.title());
|
||||||
|
@ -311,7 +314,6 @@ test.describe('View Transitions', () => {
|
||||||
p = page.locator('#query-page');
|
p = page.locator('#query-page');
|
||||||
await expect(p, 'should have content').toHaveText('Page 2');
|
await expect(p, 'should have content').toHaveText('Page 2');
|
||||||
|
|
||||||
|
|
||||||
await expect(loads.length, 'There should only be 1 page load').toEqual(1);
|
await expect(loads.length, 'There should only be 1 page load').toEqual(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue