1
0
mirror of https://github.com/morris/vanilla-todo.git synced 2025-08-31 09:31:46 +02:00
Files
vanilla-todo/test/e2e/editCustomTodoList.test.js
2024-01-29 23:13:55 +01:00

23 lines
645 B
JavaScript

import { expect, test } from '@playwright/test';
import '../coverage.js';
test('Edit custom to-do list title (Enter)', async ({ page }) => {
await page.goto('http://localhost:8080');
const add = page.locator('.todo-frame.-custom .add');
await add.click();
const title = page.locator('.todo-custom-list > .header > .title');
await title.click();
const input = page.locator('.todo-custom-list > .header > .form > .input');
await expect(input).toBeVisible();
await expect(input).toBeFocused();
await input.fill('Hello, world!');
await page.keyboard.press('Enter');
await expect(title).toHaveText('Hello, world!');
});