Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit 5b79934

Browse files
committed
optimize test
1 parent 5c25219 commit 5b79934

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

tests/demo-todo-app.spec.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@ test.describe('New Todo', () => {
1919
// Create 1st todo.
2020
await newTodo.fill(TODO_ITEMS[0]);
2121
await newTodo.press('Enter');
22-
//diff
23-
await page.evaluate(() => {
24-
document.body.style.borderTop = '12px solid hotpink';
25-
});
2622

27-
// DELIBERATE FAILURE: Expect wrong text to generate a failed test screenshot
23+
// Make sure the list only has one todo item.
2824
await expect(page.getByTestId('todo-title')).toHaveText([
29-
'WRONG EXPECTED TEXT - This will fail and generate screenshots!'
25+
TODO_ITEMS[0]
3026
]);
3127

3228
// Create 2nd todo.

0 commit comments

Comments
 (0)