@@ -113,7 +113,9 @@ test('should be able to extend multiple names (including names in grace preiod)
113113 await addresPage . search ( label )
114114 await expect ( addresPage . getNameRow ( name ) ) . toBeVisible ( { timeout : 5000 } )
115115 await expect ( await addresPage . getTimestamp ( name ) ) . not . toBe ( timestampDict [ name ] )
116- await expect ( await addresPage . getTimestamp ( name ) ) . toBe ( timestampDict [ name ] + 31536000000 * 3 )
116+ // Allow up to 3 days tolerance for leap year differences across 3 years
117+ const ts = await addresPage . getTimestamp ( name )
118+ expect ( Math . abs ( ts - timestampDict [ name ] - 31536000000 * 3 ) ) . toBeLessThanOrEqual ( 86400000 * 3 )
117119 }
118120} )
119121
@@ -179,7 +181,8 @@ test('should be able to extend a single unwrapped name from profile', async ({
179181 await extendNamesModal . getExtendButton . click ( )
180182 await transactionModal . autoComplete ( )
181183 const newTimestamp = await profilePage . getExpiryTimestamp ( )
182- expect ( newTimestamp ) . toEqual ( timestamp + 31536000000 )
184+ // Allow 1 day tolerance for leap year differences
185+ expect ( Math . abs ( newTimestamp - timestamp - 31536000000 ) ) . toBeLessThanOrEqual ( 86400000 )
183186 } )
184187} )
185188
@@ -241,7 +244,8 @@ test('should be able to extend a single unwrapped name in grace period from prof
241244 await transactionModal . autoComplete ( )
242245
243246 const newTimestamp = await profilePage . getExpiryTimestamp ( )
244- expect ( newTimestamp ) . toEqual ( timestamp + 31536000000 )
247+ // Allow 1 day tolerance for leap year differences
248+ expect ( Math . abs ( newTimestamp - timestamp - 31536000000 ) ) . toBeLessThanOrEqual ( 86400000 )
245249 } )
246250} )
247251
@@ -304,7 +308,8 @@ test('should be able to extend a single unwrapped name in grace period from prof
304308 const transactionModal = makePageObject ( 'TransactionModal' )
305309 await transactionModal . autoComplete ( )
306310 const newTimestamp = await profilePage . getExpiryTimestamp ( )
307- await expect ( newTimestamp ) . toEqual ( timestamp + 31536000000 )
311+ // Allow 1 day tolerance for leap year differences
312+ expect ( Math . abs ( newTimestamp - timestamp - 31536000000 ) ) . toBeLessThanOrEqual ( 86400000 )
308313 } )
309314} )
310315
0 commit comments