From ee3ee55e6cd1d58ec89871d90237391e1ef6d9ba Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Thu, 26 May 2022 15:56:21 -0500 Subject: [PATCH] test: fix e2e tests --- packages/astro/e2e/client-only.test.js | 10 +++++----- .../client-only/src/components/PreactCounter.tsx | 14 ++++++-------- .../client-only/src/components/ReactCounter.jsx | 14 ++++++-------- .../client-only/src/components/SolidCounter.tsx | 4 +--- .../src/components/SvelteCounter.svelte | 6 +++--- .../client-only/src/components/VueCounter.vue | 6 +++--- 6 files changed, 24 insertions(+), 30 deletions(-) diff --git a/packages/astro/e2e/client-only.test.js b/packages/astro/e2e/client-only.test.js index a4ec8a9c8cc37..78a06fdbe31b7 100644 --- a/packages/astro/e2e/client-only.test.js +++ b/packages/astro/e2e/client-only.test.js @@ -28,7 +28,7 @@ test.describe('Client only', () => { const count = await counter.locator('pre'); await expect(count, 'initial count is 0').toHaveText('0'); - const children = await counter.locator('h1'); + const children = await counter.locator('.children'); await expect(children, 'children exist').toHaveText('react'); const increment = await counter.locator('.increment'); @@ -46,7 +46,7 @@ test.describe('Client only', () => { const count = await counter.locator('pre'); await expect(count, 'initial count is 0').toHaveText('0'); - const children = await counter.locator('h1'); + const children = await counter.locator('.children'); await expect(children, 'children exist').toHaveText('preact'); const increment = await counter.locator('.increment'); @@ -64,7 +64,7 @@ test.describe('Client only', () => { const count = await counter.locator('pre'); await expect(count, 'initial count is 0').toHaveText('0'); - const children = await counter.locator('h1'); + const children = await counter.locator('.children'); await expect(children, 'children exist').toHaveText('solid'); const increment = await counter.locator('.increment'); @@ -82,7 +82,7 @@ test.describe('Client only', () => { const count = await counter.locator('pre'); await expect(count, 'initial count is 0').toHaveText('0'); - const children = await counter.locator('h1'); + const children = await counter.locator('.children'); await expect(children, 'children exist').toHaveText('vue'); const increment = await counter.locator('.increment'); @@ -100,7 +100,7 @@ test.describe('Client only', () => { const count = await counter.locator('pre'); await expect(count, 'initial count is 0').toHaveText('0'); - const children = await counter.locator('h1'); + const children = await counter.locator('.children'); await expect(children, 'children exist').toHaveText('svelte'); const increment = await counter.locator('.increment'); diff --git a/packages/astro/e2e/fixtures/client-only/src/components/PreactCounter.tsx b/packages/astro/e2e/fixtures/client-only/src/components/PreactCounter.tsx index af2258fdfe8fc..b0570046c4f8d 100644 --- a/packages/astro/e2e/fixtures/client-only/src/components/PreactCounter.tsx +++ b/packages/astro/e2e/fixtures/client-only/src/components/PreactCounter.tsx @@ -7,13 +7,11 @@ export function PreactCounter({ children, id }) { const subtract = () => setCount((i) => i - 1); return ( - <> -
- -
{count}
- -
-
{children}
- +
+ +
{count}
+ +
{children}
+
); } diff --git a/packages/astro/e2e/fixtures/client-only/src/components/ReactCounter.jsx b/packages/astro/e2e/fixtures/client-only/src/components/ReactCounter.jsx index 02eb1953907dc..30d804199bbdf 100644 --- a/packages/astro/e2e/fixtures/client-only/src/components/ReactCounter.jsx +++ b/packages/astro/e2e/fixtures/client-only/src/components/ReactCounter.jsx @@ -7,13 +7,11 @@ export function Counter({ children, id }) { const subtract = () => setCount((i) => i - 1); return ( - <> -
- -
{count}
- -
-
{children}
- +
+ +
{count}
+ +
{children}
+
); } diff --git a/packages/astro/e2e/fixtures/client-only/src/components/SolidCounter.tsx b/packages/astro/e2e/fixtures/client-only/src/components/SolidCounter.tsx index 689c5222ce97c..fbbb9850b5e46 100644 --- a/packages/astro/e2e/fixtures/client-only/src/components/SolidCounter.tsx +++ b/packages/astro/e2e/fixtures/client-only/src/components/SolidCounter.tsx @@ -7,13 +7,11 @@ export default function SolidCounter({ children, id }) { const subtract = () => setCount(count() - 1); return ( - <>
{count()}
+
{children}
-
{children}
- ); } diff --git a/packages/astro/e2e/fixtures/client-only/src/components/SvelteCounter.svelte b/packages/astro/e2e/fixtures/client-only/src/components/SvelteCounter.svelte index ab13b9c71f6bc..cc9fe8c93c600 100644 --- a/packages/astro/e2e/fixtures/client-only/src/components/SvelteCounter.svelte +++ b/packages/astro/e2e/fixtures/client-only/src/components/SvelteCounter.svelte @@ -17,9 +17,9 @@
{ count }
- -
- +
+ +