diff options
Diffstat (limited to 'packages/astro/e2e/astro-component.test.js')
-rw-r--r-- | packages/astro/e2e/astro-component.test.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/packages/astro/e2e/astro-component.test.js b/packages/astro/e2e/astro-component.test.js index c96e9b1c4..0e9c1eaed 100644 --- a/packages/astro/e2e/astro-component.test.js +++ b/packages/astro/e2e/astro-component.test.js @@ -20,25 +20,25 @@ test.describe('Astro component HMR', () => { const hero = page.locator('section'); await expect(hero, 'hero has background: white').toHaveCSS( 'background-color', - 'rgb(255, 255, 255)' + 'rgb(255, 255, 255)', ); await expect(hero, 'hero has color: black').toHaveCSS('color', 'rgb(0, 0, 0)'); // Edit the Hero component with a new background color await astro.editFile('./src/components/Hero.astro', (content) => - content.replace('background: white', 'background: rgb(230, 230, 230)') + content.replace('background: white', 'background: rgb(230, 230, 230)'), ); await expect(hero, 'background color updated').toHaveCSS( 'background-color', - 'rgb(230, 230, 230)' + 'rgb(230, 230, 230)', ); }); test('hoisted scripts', async ({ page, astro }) => { const initialLog = page.waitForEvent( 'console', - (message) => message.text() === 'Hello, Astro!' + (message) => message.text() === 'Hello, Astro!', ); await page.goto(astro.resolveUrl('/')); @@ -49,12 +49,12 @@ test.describe('Astro component HMR', () => { const updatedLog = page.waitForEvent( 'console', - (message) => message.text() === 'Hello, updated Astro!' + (message) => message.text() === 'Hello, updated Astro!', ); // Edit the hoisted script on the page await astro.editFile('./src/pages/index.astro', (content) => - content.replace('Hello, Astro!', 'Hello, updated Astro!') + content.replace('Hello, Astro!', 'Hello, updated Astro!'), ); await updatedLog; @@ -63,7 +63,7 @@ test.describe('Astro component HMR', () => { test('inline scripts', async ({ page, astro }) => { const initialLog = page.waitForEvent( 'console', - (message) => message.text() === 'Hello, inline Astro!' + (message) => message.text() === 'Hello, inline Astro!', ); await page.goto(astro.resolveUrl('/')); @@ -71,12 +71,12 @@ test.describe('Astro component HMR', () => { const updatedLog = page.waitForEvent( 'console', - (message) => message.text() === 'Hello, updated inline Astro!' + (message) => message.text() === 'Hello, updated inline Astro!', ); // Edit the inline script on the page await astro.editFile('./src/pages/index.astro', (content) => - content.replace('Hello, inline Astro!', 'Hello, updated inline Astro!') + content.replace('Hello, inline Astro!', 'Hello, updated inline Astro!'), ); await updatedLog; @@ -89,7 +89,7 @@ test.describe('Astro component HMR', () => { await Promise.all([ page.waitForLoadState('networkidle'), await astro.editFile('../_deps/astro-linked-lib/Component.astro', (content) => - content.replace('>astro-linked-lib<', '>astro-linked-lib-update<') + content.replace('>astro-linked-lib<', '>astro-linked-lib-update<'), ), ]); h1 = page.locator('#astro-linked-lib'); @@ -103,7 +103,7 @@ test.describe('Astro component HMR', () => { await Promise.all([ page.waitForLoadState('networkidle'), await astro.editFile('../_deps/astro-linked-lib/Component.astro', (content) => - content.replace('color: red', 'color: green') + content.replace('color: red', 'color: green'), ), ]); h1 = page.locator('#astro-linked-lib'); |