Split up e2e HMR test (#3425)
This commit is contained in:
parent
8eec97fdd1
commit
28ede84a88
1 changed files with 38 additions and 28 deletions
|
@ -106,7 +106,8 @@ test.describe('Multiple frameworks', () => {
|
|||
await expect(bComponent, 'component text is visible').toHaveText('Hello Astro (B)');
|
||||
});
|
||||
|
||||
test('HMR', async ({ astro, page }) => {
|
||||
test.describe('HMR', () => {
|
||||
test('Page template', async ({ astro, page }) => {
|
||||
await page.goto('/');
|
||||
|
||||
// 1: updating the page template
|
||||
|
@ -118,6 +119,10 @@ test.describe('Multiple frameworks', () => {
|
|||
);
|
||||
|
||||
await expect(preactSlot, 'slot content updated').toHaveText('Hello Preact, updated!');
|
||||
});
|
||||
|
||||
test('React component', async ({ astro, page }) => {
|
||||
await page.goto('/');
|
||||
|
||||
// Edit the react component
|
||||
await astro.editFile('./src/components/ReactCounter.jsx', (content) =>
|
||||
|
@ -126,6 +131,10 @@ test.describe('Multiple frameworks', () => {
|
|||
|
||||
const reactCount = await page.locator('#react-counter pre');
|
||||
await expect(reactCount, 'initial count updated to 5').toHaveText('5');
|
||||
});
|
||||
|
||||
test('Svelte component', async ({ astro, page }) => {
|
||||
await page.goto('/');
|
||||
|
||||
// Edit the svelte component's style
|
||||
const svelteCounter = page.locator('#svelte-counter');
|
||||
|
@ -144,3 +153,4 @@ test.describe('Multiple frameworks', () => {
|
|||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue