doc(todomvc): correctly test that the edit is cancelled (#17128)

This commit is contained in:
ilovehackathons 2022-09-13 06:39:30 +02:00 committed by GitHub
parent f61d3c9cc4
commit b689c51429
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -242,6 +242,7 @@ test.describe('Editing', () => {
test('should cancel edits on escape', async ({ page }) => {
const todoItems = page.locator('.todo-list li');
await todoItems.nth(1).dblclick();
await todoItems.nth(1).locator('.edit').fill('buy some sausages');
await todoItems.nth(1).locator('.edit').press('Escape');
await expect(todoItems).toHaveText(TODO_ITEMS);
});