doc(todomvc): correctly test that the edit is cancelled (#17128)
This commit is contained in:
parent
f61d3c9cc4
commit
b689c51429
|
|
@ -242,6 +242,7 @@ test.describe('Editing', () => {
|
||||||
test('should cancel edits on escape', async ({ page }) => {
|
test('should cancel edits on escape', async ({ page }) => {
|
||||||
const todoItems = page.locator('.todo-list li');
|
const todoItems = page.locator('.todo-list li');
|
||||||
await todoItems.nth(1).dblclick();
|
await todoItems.nth(1).dblclick();
|
||||||
|
await todoItems.nth(1).locator('.edit').fill('buy some sausages');
|
||||||
await todoItems.nth(1).locator('.edit').press('Escape');
|
await todoItems.nth(1).locator('.edit').press('Escape');
|
||||||
await expect(todoItems).toHaveText(TODO_ITEMS);
|
await expect(todoItems).toHaveText(TODO_ITEMS);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue