Skip to content

Commit cabe235

Browse files
committed
add e2e test for save-from-controls, testing if the preview is actually rendered. This tests HMR ;)
1 parent ac162a5 commit cabe235

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

code/e2e-tests/save-from-controls.spec.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { test } from '@playwright/test';
1+
import { expect, test } from '@playwright/test';
22
import process from 'process';
33

44
import { SbPage } from './util';
@@ -68,5 +68,8 @@ test.describe('save-from-controls', () => {
6868
const notification2 = await sbPage.page.waitForSelector('[title="Story created"]');
6969
await notification2.isVisible();
7070
await notification2.click();
71+
72+
// Assert the Button components is rendered in the preview
73+
await expect(sbPage.previewRoot()).toContainText('Button');
7174
});
7275
});

0 commit comments

Comments
 (0)