mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: use 'Clear' step name for locator.clear() (#36208)
This commit is contained in:
parent
090a451866
commit
b25cb7f3d1
@ -142,7 +142,7 @@ export class Locator implements api.Locator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async clear(options: channels.ElementHandleFillOptions = {}): Promise<void> {
|
async clear(options: channels.ElementHandleFillOptions = {}): Promise<void> {
|
||||||
return await this.fill('', options);
|
await this._frame._wrapApiCall(() => this.fill('', options), { title: 'Clear' });
|
||||||
}
|
}
|
||||||
|
|
||||||
async _highlight() {
|
async _highlight() {
|
||||||
|
@ -1180,6 +1180,8 @@ test('should report api steps', async ({ runInlineTest, server }) => {
|
|||||||
});
|
});
|
||||||
test('pass3', async () => {
|
test('pass3', async () => {
|
||||||
await myPage.getByRole('textbox').fill('foo');
|
await myPage.getByRole('textbox').fill('foo');
|
||||||
|
await myPage.getByRole('textbox').fill('');
|
||||||
|
await myPage.getByRole('textbox').clear();
|
||||||
});
|
});
|
||||||
|
|
||||||
test.afterAll(async () => {
|
test.afterAll(async () => {
|
||||||
@ -1202,9 +1204,11 @@ pw:api |Click locator('button') @ a.test.ts:25
|
|||||||
hook |After Hooks
|
hook |After Hooks
|
||||||
hook |Before Hooks
|
hook |Before Hooks
|
||||||
pw:api |Fill "foo" getByRole('textbox') @ a.test.ts:28
|
pw:api |Fill "foo" getByRole('textbox') @ a.test.ts:28
|
||||||
|
pw:api |Fill "" getByRole('textbox') @ a.test.ts:29
|
||||||
|
pw:api |Clear getByRole('textbox') @ a.test.ts:30
|
||||||
hook |After Hooks
|
hook |After Hooks
|
||||||
hook | afterAll hook @ a.test.ts:31
|
hook | afterAll hook @ a.test.ts:33
|
||||||
pw:api | Close context @ a.test.ts:32
|
pw:api | Close context @ a.test.ts:34
|
||||||
hook |Before Hooks
|
hook |Before Hooks
|
||||||
fixture | browser
|
fixture | browser
|
||||||
pw:api | Launch browser
|
pw:api | Launch browser
|
||||||
|
Loading…
x
Reference in New Issue
Block a user