chore: Fix BiDi session.status Param type (#9723)

This commit is contained in:
Nikolay Vitkov 2023-02-21 20:16:07 +01:00 committed by GitHub
parent dcd6a3e1da
commit 9910aae2f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -57,7 +57,7 @@ interface Commands {
returnType: {sessionId: string}; returnType: {sessionId: string};
}; };
'session.status': { 'session.status': {
params: {context: string}; // TODO: Update Types in chromium bidi params: object;
returnType: Bidi.Session.StatusResult; returnType: Bidi.Session.StatusResult;
}; };
'session.subscribe': { 'session.subscribe': {

View File

@ -36,11 +36,13 @@ describe('WebDriver BiDi', () => {
it('should work', async () => { it('should work', async () => {
const transport = new TestConnectionTransport(); const transport = new TestConnectionTransport();
const connection = new Connection(transport); const connection = new Connection(transport);
const responsePromise = connection.send('session.status', { const responsePromise = connection.send('session.new', {
context: 'context', capabilities: {
proxy: {},
},
}); });
expect(transport.sent).toEqual([ expect(transport.sent).toEqual([
`{"id":1,"method":"session.status","params":{"context":"context"}}`, `{"id":1,"method":"session.new","params":{"capabilities":{"proxy":{}}}}`,
]); ]);
const id = JSON.parse(transport.sent[0]!).id; const id = JSON.parse(transport.sent[0]!).id;
const rawResponse = { const rawResponse = {