* WIP: testing fixes to share the dev server in e2e test suites * temp: testing multiple workers * Revert "temp: testing multiple workers" This reverts commit 9c7bc9d93c9c3f6dd62e3732f878f2d86016b213.
29 lines
770 B
JavaScript
29 lines
770 B
JavaScript
import { expect } from '@playwright/test';
|
|
import { testFactory } from './test-utils.js';
|
|
|
|
const test = testFactory({ root: './fixtures/solid-recurse/' });
|
|
|
|
let devServer;
|
|
|
|
test.beforeAll(async ({ astro }) => {
|
|
devServer = await astro.startDevServer();
|
|
});
|
|
|
|
test.afterAll(async () => {
|
|
await devServer.stop();
|
|
});
|
|
|
|
test.describe('Recursive elements with Solid', () => {
|
|
test('Counter', async ({ astro, page }) => {
|
|
await page.goto('/');
|
|
|
|
const wrapper = page.locator('#case1');
|
|
await expect(wrapper, 'component is visible').toBeVisible();
|
|
|
|
const increment = page.locator('#case1-B');
|
|
await expect(increment, 'initial count is 0').toHaveText('B: 0');
|
|
|
|
await increment.click();
|
|
await expect(increment, 'count is incremented').toHaveText('B: 1');
|
|
});
|
|
});
|