fix(rpc): Frame.dblclick is missing notWaitAfter (#3210)

This commit is contained in:
Dmitry Gozman 2020-07-29 11:45:19 -07:00 committed by GitHub
parent 77b1c4b883
commit 84a17f27eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 0 deletions

View file

@ -924,6 +924,7 @@ export type FrameContentResult = {
export type FrameDblclickParams = {
selector: string,
force?: boolean,
noWaitAfter?: boolean,
modifiers?: ('Alt' | 'Control' | 'Meta' | 'Shift')[],
position?: {
x: number,

View file

@ -1049,6 +1049,7 @@ Frame:
parameters:
selector: string
force: boolean?
noWaitAfter: boolean?
modifiers:
type: array?
items:

View file

@ -498,6 +498,7 @@ export function createScheme(tChannel: (name: string) => Validator): Scheme {
scheme.FrameDblclickParams = tObject({
selector: tString,
force: tOptional(tBoolean),
noWaitAfter: tOptional(tBoolean),
modifiers: tOptional(tArray(tEnum(['Alt', 'Control', 'Meta', 'Shift']))),
position: tOptional(tObject({
x: tNumber,

View file

@ -154,6 +154,11 @@ describe('Auto waiting', () => {
await page.setContent(`<a href="${server.EMPTY_PAGE}">empty.html</a>`);
await page.click('a', { noWaitAfter: true });
});
it('should work with dblclick noWaitAfter: true', async({page, server}) => {
server.setRoute('/empty.html', async () => {});
await page.setContent(`<a href="${server.EMPTY_PAGE}">empty.html</a>`);
await page.dblclick('a', { noWaitAfter: true });
});
it('should work with waitForLoadState(load)', async({page, server}) => {
const messages = [];
server.setRoute('/empty.html', async (req, res) => {