|
1 |
| -// import { expect } from 'playwright/test'; |
| 1 | +import { expect } from 'playwright/test'; |
2 | 2 | import { test } from './fixture';
|
3 | 3 |
|
4 | 4 | test.beforeEach(async ({ page }) => {
|
5 | 5 | await page.goto('https://todomvc.com/examples/react/dist/');
|
6 | 6 | });
|
7 | 7 |
|
8 |
| -test('ai todo', async ({ ai, aiQuery: _test }) => { |
| 8 | +test('ai todo', async ({ ai, aiQuery }) => { |
9 | 9 | await ai('Enter "Learn JS today" in the task box, then press Enter to create');
|
10 |
| - // await ai('Enter "Learn Rust tomorrow" in the task box, then press Enter to create'); |
11 |
| - // await ai('Enter "Learning AI the day after tomorrow" in the task box, then press Enter to create'); |
12 |
| - // await ai( |
13 |
| - // 'Move your mouse over the second item in the task list and click the Delete button to the right of the second task', |
14 |
| - // ); |
15 |
| - // await ai('Click the check button to the left of the second task'); |
16 |
| - // await ai('Click the completed Status button below the task list'); |
| 10 | + await ai('Enter "Learn Rust tomorrow" in the task box, then press Enter to create'); |
| 11 | + await ai('Enter "Learning AI the day after tomorrow" in the task box, then press Enter to create'); |
| 12 | + await ai( |
| 13 | + 'Move your mouse over the second item in the task list and click the Delete button to the right of the second task', |
| 14 | + ); |
| 15 | + await ai('Click the check button to the left of the second task'); |
| 16 | + await ai('Click the completed Status button below the task list'); |
17 | 17 |
|
18 |
| - // const taskList = await aiQuery<string[]>('string[], tasks in the list'); |
19 |
| - // expect(taskList.length).toBe(1); |
20 |
| - // expect(taskList[0]).toBe('Learning AI the day after tomorrow'); |
| 18 | + const taskList = await aiQuery<string[]>('string[], tasks in the list'); |
| 19 | + expect(taskList.length).toBe(1); |
| 20 | + expect(taskList[0]).toBe('Learning AI the day after tomorrow'); |
21 | 21 |
|
22 |
| - // const placeholder = await ai('string, return the placeholder text in the input box', 'query'); |
23 |
| - // expect(placeholder).toBe('What needs to be done?'); |
| 22 | + const placeholder = await ai('string, return the placeholder text in the input box', { type: 'query' }); |
| 23 | + expect(placeholder).toBe('What needs to be done?'); |
24 | 24 | });
|
0 commit comments