@@ -250,31 +250,6 @@ describe('connatixBidAdapter', function () {
250
250
expect ( result ) . to . equal ( 100 ) ;
251
251
} ) ;
252
252
253
- it ( 'should return 48% viewability when the element is partially in view (48%) and has a valid viewabilityContainerIdentifier' , ( ) => {
254
- const bid = {
255
- params : { viewabilityContainerIdentifier : '#validElement' } ,
256
- adUnitCode : 'adUnitCode123' ,
257
- mediaTypes : { video : { sizes : [ [ 300 , 250 ] ] } } ,
258
- } ;
259
-
260
- getBoundingClientRectStub . returns ( {
261
- top : 100 , // 100 pixels from the top of the viewport
262
- left : 400 , // 400 pixels from the left of the viewport (halfway in horizontal direction)
263
- bottom : 800 , // 800 pixels from the top (extends 200 pixels outside the bottom)
264
- right : 1000 , // 1000 pixels from the left (extends 200 pixels outside the right)
265
- width : 600 , // Width of the rect is 600 pixels
266
- height : 700 , // Height of the rect is 700 pixels (only 300 pixels inside the viewport)
267
- } ) ;
268
-
269
- querySelectorStub . withArgs ( '#validElement' ) . returns ( element ) ;
270
- getElementByIdStub . returns ( null ) ;
271
-
272
- const result = connatixDetectViewability ( bid ) ;
273
-
274
- // Expected calculation: the element is partially in view, so 48% viewability
275
- expect ( result ) . to . equal ( 48 ) ;
276
- } ) ;
277
-
278
253
it ( 'should fall back to using bid sizes and adUnitCode when the viewabilityContainerIdentifier is invalid or was not provided' , ( ) => {
279
254
const bid = {
280
255
params : { viewabilityContainerIdentifier : '#invalidElement' } ,
0 commit comments