Demonstrate Playwright

This commit is contained in:
Steve Kinney
2024-10-08 17:04:08 -06:00
parent 9ac6b6e1ef
commit eac857a010
2 changed files with 13 additions and 4 deletions

View File

@@ -1,2 +1,12 @@
import { test, expect } from '@playwright/test';
import { createServer } from 'vite';
test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:5173');
});
test('it has a counter', async ({ page }) => {
const count = page.getByTestId('counter-count');
const incrementButton = page.getByRole('button', { name: /increment/i });
await incrementButton.click();
});