Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Status bar height and update test #166

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix Status bar height and update test
  • Loading branch information
pankaj443 committed Sep 5, 2023
commit fbf8cd2154713a6e09f1ade1a6cf18246d857bad
6 changes: 3 additions & 3 deletions percy/providers/appAutomateProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@

JSON.parse(response.result).forEach(tileData => {
tiles.push(new Tile({
statBarHeight,
navBarHeight,
fullscreen,
statusBarHeight: statBarHeight,
navBarHeight: navBarHeight,

Check warning on line 152 in percy/providers/appAutomateProvider.js

View workflow job for this annotation

GitHub Actions / Lint

Expected property shorthand
fullscreen: fullscreen,

Check warning on line 153 in percy/providers/appAutomateProvider.js

View workflow job for this annotation

GitHub Actions / Lint

Expected property shorthand
headerHeight: tileData.header_height,
footerHeight: tileData.footer_height,
sha: tileData.sha.split('-')[0] // drop build id
Expand Down
4 changes: 3 additions & 1 deletion test/percy/providers/appAutomateProvider.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ describe('AppAutomateProvider', () => {
args['options']['deviceHeight'] = screenSize['height'];
appAutomate.metadata = { statusBarHeight: () => 100, navigationBarHeight: () => 200, scaleFactor: () => 1, screenSize: () => screenSize };

await appAutomate.getTiles(true, false, null, null, null);
let tiles = await appAutomate.getTiles(true, false, null, null, null);
expect(tiles[0].statusBarHeight).toEqual(100);
expect(tiles[0].navBarHeight).toEqual(200);
expect(browserstack_executorSpy).toHaveBeenCalledWith('percyScreenshot', args);
});
});
Expand Down
Loading