Skip to content

Commit

Permalink
Fix Status bar height and update test
Browse files Browse the repository at this point in the history
  • Loading branch information
pankaj443 committed Sep 5, 2023
1 parent 42dbeef commit fbf8cd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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 @@ class AppAutomateProvider extends GenericProvider {

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

0 comments on commit fbf8cd2

Please sign in to comment.