From 2ea9624004980b35bb1e2c124cb44618b636b4e4 Mon Sep 17 00:00:00 2001 From: rishigupta1599 Date: Mon, 16 Oct 2023 02:22:12 +0530 Subject: [PATCH] Rebasing --- .../test/metadata/metaDataResolver.test.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/webdriver-utils/test/metadata/metaDataResolver.test.js b/packages/webdriver-utils/test/metadata/metaDataResolver.test.js index 040792439..23a3edddb 100644 --- a/packages/webdriver-utils/test/metadata/metaDataResolver.test.js +++ b/packages/webdriver-utils/test/metadata/metaDataResolver.test.js @@ -32,5 +32,19 @@ describe('MetaDataResolver', () => { expect(metadata.driver).toEqual(driver); expect(metadata.capabilities).toEqual({}); }); + + it('resolves MobileMetaData when deviceName is passed', () => { + metadata = MetaDataResolver.resolve(driver, capabilities, { platform: 'Linux', deviceName: 'RX224' }); + expect(metadata).toBeInstanceOf(MobileMetaData); + expect(metadata.driver).toEqual(driver); + expect(metadata.capabilities).toEqual({}); + }); + + it('resolves DesktopMetaData when no deviceName is passed', () => { + metadata = MetaDataResolver.resolve(driver, capabilities, { platform: 'Linux' }); + expect(metadata).toBeInstanceOf(DesktopMetaData); + expect(metadata.driver).toEqual(driver); + expect(metadata.capabilities).toEqual({}); + }); }); });