Skip to content

Commit

Permalink
Added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pankaj443 committed Apr 23, 2024
1 parent 0b92478 commit 190e4e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion percy/metadata/iosMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class IosMetadata extends Metadata {
return data.statusBarHeight * data.pixelRatio;
}

// For iOS method to fetch statusBarHeight for wdio & wd is different
if (this.driver.wdio) {
return (await this.viewportRect()).top;
} else {
Expand All @@ -34,7 +35,8 @@ class IosMetadata extends Metadata {
return { width: data.screenWidth, height: data.screenHeight };
}

var height, width;
let height, width;
// For iOS method to fetch screenSize for wdio & wd is different
if (this.driver.wdio) {
const viewportRect = await this.viewportRect();
height = viewportRect.top + viewportRect.height;
Expand Down Expand Up @@ -69,6 +71,7 @@ class IosMetadata extends Metadata {
}

async scaleFactor() {
// For iOS method to fetch scaleFactor for wdio & wd is different
if (this.driver.wdio) {
const viewportRect = await this.viewportRect();
const actualWidth = viewportRect.width;
Expand Down

0 comments on commit 190e4e0

Please sign in to comment.