Skip to content

Commit

Permalink
Updating Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Amit3200 committed Sep 14, 2023
1 parent 1209084 commit 9eda3e4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/webdriver-utils/test/metadata/metaDataResolver.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({});
});
});
});

0 comments on commit 9eda3e4

Please sign in to comment.