chore: test cleanup
This commit is contained in:
parent
8326cfddf7
commit
31bcd81101
10 changed files with 75 additions and 1 deletions
|
@ -12,6 +12,10 @@ const someProps = {
|
|||
<!-- Head Stuff -->
|
||||
</head>
|
||||
<body>
|
||||
<Counter id="server-only" {...someProps}>
|
||||
<h1>Hello, server!</h1>
|
||||
</Counter>
|
||||
|
||||
<Counter id="counter-idle" {...someProps} client:idle>
|
||||
<h1>Hello, client:idle!</h1>
|
||||
</Counter>
|
||||
|
|
|
@ -12,6 +12,10 @@ const someProps = {
|
|||
<!-- Head Stuff -->
|
||||
</head>
|
||||
<body>
|
||||
<Counter id="server-only" {...someProps}>
|
||||
<h1>Hello, server!</h1>
|
||||
</Counter>
|
||||
|
||||
<Counter id="counter-idle" {...someProps} client:idle>
|
||||
<h1>Hello, client:idle!</h1>
|
||||
</Counter>
|
||||
|
|
|
@ -11,6 +11,10 @@ const someProps = {
|
|||
<!-- Head Stuff -->
|
||||
</head>
|
||||
<body>
|
||||
<Counter id="server-only" {...someProps}>
|
||||
<h1>Hello, server!</h1>
|
||||
</Counter>
|
||||
|
||||
<Counter id="counter-idle" {...someProps} client:idle>
|
||||
<h1>Hello, client:idle!</h1>
|
||||
</Counter>
|
||||
|
|
|
@ -11,6 +11,10 @@ const someProps = {
|
|||
<!-- Head Stuff -->
|
||||
</head>
|
||||
<body>
|
||||
<Counter id="server-only">
|
||||
<h1>Hello, server!</h1>
|
||||
</Counter>
|
||||
|
||||
<Counter id="counter-idle" client:idle>
|
||||
<h1>Hello, client:idle!</h1>
|
||||
</Counter>
|
||||
|
|
|
@ -57,6 +57,7 @@ test.only('Lit', async ({ page, astro }) => {
|
|||
await page.goto(astro.resolveUrl('/'));
|
||||
|
||||
const counter = page.locator('#counter-visible');
|
||||
await counter.scrollIntoViewIfNeeded();
|
||||
await expect(counter).toBeVisible();
|
||||
|
||||
const count = counter.locator('p');
|
||||
|
|
|
@ -25,6 +25,19 @@ test.afterEach(async ({ astro }) => {
|
|||
test.only('Preact', async ({ page, astro }) => {
|
||||
await page.goto(astro.resolveUrl('/'));
|
||||
|
||||
await test.step('server only', async () => {
|
||||
const counter = page.locator('#server-only');
|
||||
await expect(counter).toBeVisible();
|
||||
|
||||
const count = counter.locator('pre');
|
||||
await expect(count).toHaveText('0');
|
||||
|
||||
const inc = counter.locator('.increment');
|
||||
await inc.click();
|
||||
|
||||
await expect(count).toHaveText('0');
|
||||
});
|
||||
|
||||
await test.step('client:idle', async () => {
|
||||
const counter = page.locator('#counter-idle');
|
||||
await expect(counter).toBeVisible();
|
||||
|
@ -53,6 +66,7 @@ test.only('Preact', async ({ page, astro }) => {
|
|||
|
||||
await test.step('client:visible', async () => {
|
||||
const counter = page.locator('#counter-visible');
|
||||
await counter.scrollIntoViewIfNeeded();
|
||||
await expect(counter).toBeVisible();
|
||||
|
||||
const count = counter.locator('pre');
|
||||
|
|
|
@ -25,6 +25,19 @@ test.afterEach(async ({ astro }) => {
|
|||
test.only('React', async ({ page, astro }) => {
|
||||
await page.goto(astro.resolveUrl('/'));
|
||||
|
||||
await test.step('server only', async () => {
|
||||
const counter = page.locator('#server-only');
|
||||
await expect(counter).toBeVisible();
|
||||
|
||||
const count = counter.locator('pre');
|
||||
await expect(count).toHaveText('0');
|
||||
|
||||
const inc = counter.locator('.increment');
|
||||
await inc.click();
|
||||
|
||||
await expect(count).toHaveText('0');
|
||||
});
|
||||
|
||||
await test.step('client:idle', async () => {
|
||||
const counter = page.locator('#counter-idle');
|
||||
await expect(counter).toBeVisible();
|
||||
|
@ -53,6 +66,7 @@ test.only('React', async ({ page, astro }) => {
|
|||
|
||||
await test.step('client:visible', async () => {
|
||||
const counter = page.locator('#counter-visible');
|
||||
await counter.scrollIntoViewIfNeeded();
|
||||
await expect(counter).toBeVisible();
|
||||
|
||||
const count = counter.locator('pre');
|
||||
|
|
|
@ -25,6 +25,19 @@ test.afterEach(async ({ astro }) => {
|
|||
test.only('Solid', async ({ page, astro }) => {
|
||||
await page.goto(astro.resolveUrl('/'));
|
||||
|
||||
await test.step('server only', async () => {
|
||||
const counter = page.locator('#server-only');
|
||||
await expect(counter).toBeVisible();
|
||||
|
||||
const count = counter.locator('pre');
|
||||
await expect(count).toHaveText('0');
|
||||
|
||||
const inc = counter.locator('.increment');
|
||||
await inc.click();
|
||||
|
||||
await expect(count).toHaveText('0');
|
||||
});
|
||||
|
||||
await test.step('client:idle', async () => {
|
||||
const counter = page.locator('#counter-idle');
|
||||
await expect(counter).toBeVisible();
|
||||
|
@ -53,6 +66,7 @@ test.only('Solid', async ({ page, astro }) => {
|
|||
|
||||
await test.step('client:visible', async () => {
|
||||
const counter = page.locator('#counter-visible');
|
||||
await counter.scrollIntoViewIfNeeded();
|
||||
await expect(counter).toBeVisible();
|
||||
|
||||
const count = counter.locator('pre');
|
||||
|
|
|
@ -25,6 +25,19 @@ test.afterEach(async ({ astro }) => {
|
|||
test.only('Svelte', async ({ page, astro }) => {
|
||||
await page.goto(astro.resolveUrl('/'));
|
||||
|
||||
await test.step('server only', async () => {
|
||||
const counter = page.locator('#server-only');
|
||||
await expect(counter).toBeVisible();
|
||||
|
||||
const count = counter.locator('pre');
|
||||
await expect(count).toHaveText('0');
|
||||
|
||||
const inc = counter.locator('.increment');
|
||||
await inc.click();
|
||||
|
||||
await expect(count).toHaveText('0');
|
||||
});
|
||||
|
||||
await test.step('client:idle', async () => {
|
||||
const counter = page.locator('#counter-idle');
|
||||
await expect(counter).toBeVisible();
|
||||
|
@ -53,6 +66,7 @@ test.only('Svelte', async ({ page, astro }) => {
|
|||
|
||||
await test.step('client:visible', async () => {
|
||||
const counter = page.locator('#counter-visible');
|
||||
await counter.scrollIntoViewIfNeeded();
|
||||
await expect(counter).toBeVisible();
|
||||
|
||||
const count = counter.locator('pre');
|
||||
|
|
|
@ -25,7 +25,7 @@ test.afterEach(async ({ astro }) => {
|
|||
test.only('Vue', async ({ page, astro }) => {
|
||||
await page.goto(astro.resolveUrl('/'));
|
||||
|
||||
await test.step('client:only', async () => {
|
||||
await test.step('server only', async () => {
|
||||
const counter = page.locator('#server-only');
|
||||
await expect(counter).toBeVisible();
|
||||
|
||||
|
@ -90,6 +90,7 @@ test.only('Vue', async ({ page, astro }) => {
|
|||
|
||||
await test.step('client:visible', async () => {
|
||||
const counter = page.locator('#client-visible');
|
||||
await counter.scrollIntoViewIfNeeded();
|
||||
await expect(counter).toBeVisible();
|
||||
|
||||
await counter.scrollIntoViewIfNeeded();
|
||||
|
|
Loading…
Reference in a new issue