Skip to content

Commit 445c28c

Browse files
committed
fix: tests fixed
1 parent 24c323f commit 445c28c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/crx/player-actions.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ test('should fail while playing setInputFiles', async ({ page, recorderPage, bas
133133

134134
await expect.poll(dumpLogHeaders(recorderPage)).toEqual([
135135
`► page.goto( ${baseURL}/root.html ) ✅ — XXms`,
136-
`▼ page.getByRole('textbox') .setInputFiles() ❌ — XXms`,
136+
`▼ page.getByRole('button', { name: 'Choose File' }) .setInputFiles() ❌ — XXms`,
137137
]);
138138

139139
await Promise.all([

tests/crx/recorder.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ test('test', async ({ page, context }) => {
181181
await page.getByRole('checkbox').check();
182182
await page.getByRole('button', { name: 'button' }).click();
183183
await page.getByRole('checkbox').uncheck();
184-
await page.locator('input[type="text"]').fill('Hello world');
185-
await page.locator('input[type="text"]').press('Tab');
184+
await page.getByRole('textbox').fill('Hello world');
185+
await page.getByRole('textbox').press('Tab');
186186
await page.getByRole('combobox').selectOption('B');
187-
await page.locator('input[type="file"]').setInputFiles('file-to-upload.txt');
187+
await page.getByRole('button', { name: 'Choose File' }).setInputFiles('file-to-upload.txt');
188188
const page1 = await context.newPage();
189189
await page1.close();
190190
await expect(page.getByRole('checkbox')).not.toBeChecked();
191-
await expect(page.locator('input[type="text"]')).toHaveValue('Hello world');
191+
await expect(page.getByRole('textbox')).toHaveValue('Hello world');
192192
await expect(page.getByRole('combobox')).toHaveValue('B');
193193
await expect(page.locator('div')).toContainText('Some long text');
194194
await expect(page.getByText('Some long text')).toBeVisible();
@@ -199,7 +199,7 @@ test('test', async ({ page, context }) => {
199199
- combobox:
200200
- option "A"
201201
- option "B" [selected]
202-
- textbox: C:\\\\fakepath\\\\file-to-upload.txt
202+
- button "Choose File"
203203
- text: Some long text
204204
\`);
205205
});`;

0 commit comments

Comments
 (0)