File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ describe('AndroidDevice', () => {
125
125
const size1 = await device . size ( ) ;
126
126
const size2 = await device . size ( ) ;
127
127
128
- expect ( size1 ) . toEqual ( { width : 540 , height : 960 , dpr : 2 } ) ;
128
+ expect ( size1 ) . toEqual ( { width : 540 , height : 960 } ) ;
129
129
expect ( size2 ) . toEqual ( size1 ) ;
130
130
// Caching is removed, so it should be called twice
131
131
expect ( vi . spyOn ( device as any , 'getScreenSize' ) ) . toHaveBeenCalledTimes ( 2 ) ;
@@ -1343,7 +1343,7 @@ describe('AndroidDevice', () => {
1343
1343
expect ( mockAdbInstance . shell ) . toHaveBeenCalledWith ( 'dumpsys display' ) ;
1344
1344
expect ( size . width ) . toBe ( 411 ) ; // 1080 / (420/160) ≈ 411
1345
1345
expect ( size . height ) . toBe ( 731 ) ; // 1920 / (420/160) ≈ 731
1346
- expect ( size . dpr ) . toBe ( 2.625 ) ; // 420 / 160 = 2.625
1346
+ // dpr is no longer returned in size()
1347
1347
} ) ;
1348
1348
1349
1349
it ( 'should use display ID for screenshots by default when displayId is set' , async ( ) => {
Original file line number Diff line number Diff line change @@ -186,7 +186,6 @@ describe('IOSDevice', () => {
186
186
expect ( size ) . toEqual ( {
187
187
width : 375 ,
188
188
height : 812 ,
189
- dpr : 2 ,
190
189
} ) ;
191
190
expect ( mockWdaClient . getWindowSize ) . toHaveBeenCalled ( ) ;
192
191
} ) ;
@@ -298,7 +297,6 @@ describe('IOSDevice', () => {
298
297
expect ( size ) . toEqual ( {
299
298
width : 375 ,
300
299
height : 812 ,
301
- dpr : 2 ,
302
300
} ) ;
303
301
} ) ;
304
302
@@ -472,11 +470,6 @@ describe('IOSDevice', () => {
472
470
await device . connect ( ) ;
473
471
} ) ;
474
472
475
- it ( 'should calculate DPR correctly' , async ( ) => {
476
- const size = await device . size ( ) ;
477
- expect ( size . dpr ) . toBe ( 2 ) ; // DPR from mocked getScreenScale
478
- } ) ;
479
-
480
473
it ( 'should handle different screen sizes' , async ( ) => {
481
474
mockWdaClient . getWindowSize = vi
482
475
. fn ( )
You can’t perform that action at this time.
0 commit comments