From a663d280de741cd56bf40a52f361dc4815b6dfb9 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Tue, 2 Apr 2024 22:18:30 +0200 Subject: [PATCH] [js] Running format script --- .../selenium-webdriver/bidi/browsingContext.js | 15 +++++---------- .../test/bidi/browsingcontext_test.js | 14 +++++++------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/javascript/node/selenium-webdriver/bidi/browsingContext.js b/javascript/node/selenium-webdriver/bidi/browsingContext.js index ec22aff2e296a..da0b58f857620 100644 --- a/javascript/node/selenium-webdriver/bidi/browsingContext.js +++ b/javascript/node/selenium-webdriver/bidi/browsingContext.js @@ -168,16 +168,11 @@ class BrowsingContext { throw Error(result['error']) } - const contexts = result['result']['contexts']; - const browsingContexts = contexts.map(context => { - return new BrowsingContextInfo( - context['id'], - context['url'], - context['children'], - context['parent'] - ); - }); - return browsingContexts; + const contexts = result['result']['contexts'] + const browsingContexts = contexts.map((context) => { + return new BrowsingContextInfo(context['id'], context['url'], context['children'], context['parent']) + }) + return browsingContexts } /** diff --git a/javascript/node/selenium-webdriver/test/bidi/browsingcontext_test.js b/javascript/node/selenium-webdriver/test/bidi/browsingcontext_test.js index 52488babb02df..d2b7e7a2d5407 100644 --- a/javascript/node/selenium-webdriver/test/bidi/browsingcontext_test.js +++ b/javascript/node/selenium-webdriver/test/bidi/browsingcontext_test.js @@ -447,18 +447,18 @@ suite( const devicePixelRatio = await driver.executeScript('return window.devicePixelRatio;') assert.equal(devicePixelRatio, 5) - }); + }) - it('Get All Top level browsing contexts', async ()=> { + it('Get All Top level browsing contexts', async () => { const id = await driver.getWindowHandle() const window1 = await BrowsingContext(driver, { browsingContextId: id, - }); - const window2 = await BrowsingContext(driver, {type: 'window'}); + }) + const window2 = await BrowsingContext(driver, { type: 'window' }) - const res = await window1.getTopLevelContexts(); - assert.equal(res.length, 2); - }); + const res = await window1.getTopLevelContexts() + assert.equal(res.length, 2) + }) }) }, { browsers: [Browser.FIREFOX] },