Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit be68368

Browse files
authoredOct 5, 2022
chore: sync with upstream example todomvc tests
1 parent bbfae65 commit be68368

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎assets/demo-todo-app.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ test.describe('Editing', () => {
239239
test('should cancel edits on escape', async ({ page }) => {
240240
const todoItems = page.locator('.todo-list li');
241241
await todoItems.nth(1).dblclick();
242+
await todoItems.nth(1).locator('.edit').fill('buy some sausages');
242243
await todoItems.nth(1).locator('.edit').press('Escape');
243244
await expect(todoItems).toHaveText(TODO_ITEMS);
244245
});
@@ -296,7 +297,7 @@ test.describe('Persistence', () => {
296297
await expect(todoItems).toHaveClass(['completed', '']);
297298

298299
// Ensure there is 1 completed item.
299-
checkNumberOfCompletedTodosInLocalStorage(page, 1);
300+
await checkNumberOfCompletedTodosInLocalStorage(page, 1);
300301

301302
// Now reload.
302303
await page.reload();

‎assets/demo-todo-app.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ test.describe('Editing', () => {
238238
test('should cancel edits on escape', async ({ page }) => {
239239
const todoItems = page.locator('.todo-list li');
240240
await todoItems.nth(1).dblclick();
241+
await todoItems.nth(1).locator('.edit').fill('buy some sausages');
241242
await todoItems.nth(1).locator('.edit').press('Escape');
242243
await expect(todoItems).toHaveText(TODO_ITEMS);
243244
});
@@ -295,7 +296,7 @@ test.describe('Persistence', () => {
295296
await expect(todoItems).toHaveClass(['completed', '']);
296297

297298
// Ensure there is 1 completed item.
298-
checkNumberOfCompletedTodosInLocalStorage(page, 1);
299+
await checkNumberOfCompletedTodosInLocalStorage(page, 1);
299300

300301
// Now reload.
301302
await page.reload();

0 commit comments

Comments
 (0)
Please sign in to comment.