Skip to content

Commit 65b3695

Browse files
committed
Update tests
1 parent 1f1889a commit 65b3695

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/inc/functions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export const handlePageView = (fragmentPlugin: FragmentPlugin): void => {
1717
};
1818

1919
/**
20-
* Run `showModal` for all `<dialog[data-swup-fragment]>` elements
21-
* This puts them on the top layer and makes them ignore css `transform`s on parent elements
20+
* Run `showModal` for all `<dialog[data-swup-fragment][open]>` elements
21+
* This puts them on the top layer and makes them ignore css transforms on parent elements
2222
* @see https://developer.mozilla.org/en-US/docs/Glossary/Top_layer
2323
*/
2424
function showDialogs({ logger }: FragmentPlugin): void {

tests/playwright/fragment-plugin.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ test.describe('Fragment Plugin', () => {
5151
await expect(page.locator('#list h2')).toHaveText('Green Items');
5252
});
5353

54-
test('should move <dialog> fragments to the top layer', async ({ page }) => {
54+
test('should move <dialog open> fragments to the top layer', async ({ page }) => {
5555
await page.goto('/list/');
5656

5757
await clickOnLink(page, '/detail/');
5858

59-
const dialog = page.locator('dialog[data-swup-fragment]');
59+
const dialog = page.locator('dialog[data-swup-fragment][open]');
6060

6161
await expect(dialog).toBeVisible();
6262

0 commit comments

Comments
 (0)