Skip to content

Commit

Permalink
Adding support for legacy protocol (#1323)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amit3200 authored and rishigupta1599 committed Aug 7, 2023
1 parent b1cd7c2 commit 6629765
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/webdriver-utils/src/metadata/mobileMetaData.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class MobileMetaData {
if (bsVersion?.length > 0) {
return bsVersion[0];
}
return this.capabilities.version.split('.')[0];
return this.capabilities?.version?.split('.')[0];
}

osName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,17 +469,12 @@ describe('GenericProvider', () => {
it('should return 0,0 for unmatched device name', async () => {
await provider.createDriver();
let mockResponseObject = {
'iPhone 13 Pro-14': {
safari: {
header: 141,
footer: 399
}
}
'iPhone 13 Pro-14': {}
};
spyOn(Cache, 'withCache').and.returnValue(
Promise.resolve(mockResponseObject)
);
const [header, footer] = await provider.getHeaderFooter();
const [header, footer] = await provider.getHeaderFooter('iPhone 13 Pro', '14', 'safari');
expect(header).toEqual(0);
expect(footer).toEqual(0);
});
Expand Down

0 comments on commit 6629765

Please sign in to comment.