Skip to content

Commit 8246bcc

Browse files
authored
bug fix for lost view transition names introduced by 5.9.0 (#13907)
* bug fix for lost view transition names introduced by 5.9.0 * removed comment
1 parent 81f71ca commit 8246bcc

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

.changeset/shy-showers-care.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Fixes a bug that caused view transition names to be lost.

packages/astro/e2e/view-transitions.test.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -738,8 +738,7 @@ test.describe('View Transitions', () => {
738738
await expect(h, 'should have content').toHaveAttribute('style', 'background-color: green');
739739
await expect(h, 'should have content').toHaveAttribute('data-other-name', 'value');
740740
await expect(h, 'should have content').toHaveAttribute('data-astro-fake', 'value');
741-
// TODO: check this assertion
742-
// await expect(h, 'should have content').toHaveAttribute('data-astro-transition', 'forward');
741+
await expect(h, 'should have content').toHaveAttribute('data-astro-transition', 'forward');
743742
await expect(h, 'should have swap rest of data-astro-* attributes').toHaveAttribute(
744743
'data-astro-transition-scope',
745744
'scope-y',
@@ -1419,8 +1418,7 @@ test.describe('View Transitions', () => {
14191418
expect(loads.length, 'There should only be 1 page load').toEqual(1);
14201419
});
14211420

1422-
// TODO: investigate, it weirdly fails
1423-
test.skip('transition:name should be escaped correctly', async ({ page, astro }) => {
1421+
test('transition:name should be escaped correctly', async ({ page, astro }) => {
14241422
// view-transition-name errors on browser w/o native support
14251423
if (!(await nativeViewTransition(page))) return;
14261424
const expectedAnimations = new Set();
@@ -1584,8 +1582,7 @@ test.describe('View Transitions', () => {
15841582
await expect(p, 'should have content').toHaveText('Page 1');
15851583
});
15861584

1587-
// It weirdly fails
1588-
test.skip('animation get canceled when view transition is interrupted', async ({
1585+
test('animation get canceled when view transition is interrupted', async ({
15891586
page,
15901587
astro,
15911588
}) => {

packages/astro/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
"test:integration": "astro-scripts test \"test/*.test.js\""
114114
},
115115
"dependencies": {
116-
"@astrojs/compiler": "^2.12.0",
116+
"@astrojs/compiler": "^2.12.1",
117117
"@astrojs/internal-helpers": "workspace:*",
118118
"@astrojs/markdown-remark": "workspace:*",
119119
"@astrojs/telemetry": "workspace:*",

pnpm-lock.yaml

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)