chore: rename playwrite to playwright (#1203)

I assume this was a mistake and not intentional.
This commit is contained in:
Brian Donovan authored and GitHub committed 2023-07-17 11:00:59 -05:00
1 parent 9cef71b6b9
commit 947b7b650e
14 files changed
+30 -28

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
// @ts-check
const { test, expect } = require('@playwright/test');
test('button click', async ({ page }) => {
await page.goto('http://localhost:3333');
// Expect the page to contain the counter text.
const main = page.locator('#main');
await expect(main).toContainText('hello axum! 12345');
// Click the increment button.
let button = await page.locator('button.increment-button');
await button.click();
// Expect the page to contain the updated counter text.
await expect(main).toContainText('hello axum! 12346');
});
test('fullstack communication', async ({ page }) => {
await page.goto('http://localhost:3333');
// Expect the page to contain the counter text.
const main = page.locator('#main');
await expect(main).toContainText('Server said: ...');
// Click the increment button.
let button = await page.locator('button.server-button');
await button.click();
// Expect the page to contain the updated counter text.
await expect(main).toContainText('Server said: Hello from the server!');
});