Skip to content

Commit

Permalink
fix(rpc): Frame.dblclick is missing notWaitAfter (#3210)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgozman authored Jul 29, 2020
1 parent 77b1c4b commit 84a17f2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rpc/channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@ export type FrameContentResult = {
export type FrameDblclickParams = {
selector: string,
force?: boolean,
noWaitAfter?: boolean,
modifiers?: ('Alt' | 'Control' | 'Meta' | 'Shift')[],
position?: {
x: number,
Expand Down
1 change: 1 addition & 0 deletions src/rpc/protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,7 @@ Frame:
parameters:
selector: string
force: boolean?
noWaitAfter: boolean?
modifiers:
type: array?
items:
Expand Down
1 change: 1 addition & 0 deletions src/rpc/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions test/autowaiting.jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 84a17f2

Please sign in to comment.