@@ -239,14 +239,14 @@ test.describe('Test for test cases', { tag: ['@reg'] }, () => {
239239
240240 //Act
241241 await header . openContactUsPage ( ) ;
242- await expect . soft ( contactUs . header ) . toBeVisible ( ) ;
242+ await contactUs . isHeaderVisible ( ) ;
243243 await contactUs . fillContactUs ( contactUsFormData ) ;
244244
245245 await contactUs . catchDialog ( ) ;
246246 await contactUs . buttonAcceptDialog . click ( ) ;
247247
248- await expect . soft ( contactUs . alertMessage ) . toContainText ( data . contactUs . alertSuccess ) ;
249- await contactUs . buttonBackHome . click ( ) ;
248+ await contactUs . catchAlert ( data . contactUs . alertSuccess ) ;
249+ await contactUs . clickBackHome ( ) ;
250250
251251 //Assert
252252 await home . expectHomePage ( ) ;
@@ -348,11 +348,11 @@ test.describe('Test for test cases', { tag: ['@reg'] }, () => {
348348
349349 //Act
350350 await home . scrollDownPage ( ) ;
351- await expect ( home . footer . headerSubscription ) . toBeVisible ( ) ;
351+ await home . footer . isHeaderSubscriptionVisible ( ) ;
352352 await home . footer . sendSubscribe ( emailData . email ) ;
353353
354354 //Assert
355- await expect ( home . footer . alertSuccessSubs ) . toContainText ( data . footer . confirmationSubscribe ) ;
355+ await home . footer . catchAlert ( data . footer . confirmationSubscribe ) ;
356356
357357 // Test Case 10: Verify Subscription in home page
358358 // 1. Launch browser
@@ -371,11 +371,11 @@ test.describe('Test for test cases', { tag: ['@reg'] }, () => {
371371 await header . openCartPage ( ) ;
372372 await cart . expectCartPage ( ) ;
373373 await cart . scrollDownPage ( ) ;
374- await expect ( footer . headerSubscription ) . toBeVisible ( ) ;
374+ await footer . isHeaderSubscriptionVisible ( ) ;
375375 await footer . sendSubscribe ( emailData . email ) ;
376376
377377 //Assert
378- await expect ( footer . alertSuccessSubs ) . toContainText ( data . footer . confirmationSubscribe ) ;
378+ await footer . catchAlert ( data . footer . confirmationSubscribe ) ;
379379
380380 // Test Case 11: Verify Subscription in Cart page
381381 // 1. Launch browser
@@ -899,7 +899,7 @@ test.describe('Test for test cases', { tag: ['@reg'] }, () => {
899899 test ( 'Case 22: Add to cart from Recommended items' , async ( { home, cart } ) => {
900900 //Act
901901 await home . scrollDownPage ( ) ;
902- await expect . soft ( home . headerRecommendedItems ) . toBeVisible ( ) ;
902+ await home . isHeaderRecommendedItemsVisible ( ) ;
903903 await home . addFromRecommendedItemsAndViewCart ( ) ;
904904
905905 //Assert
@@ -1052,10 +1052,10 @@ test.describe('Test for test cases', { tag: ['@reg'] }, () => {
10521052 test ( 'Case 25: Verify Scroll Up using "Arrow" button and Scroll Down functionality' , async ( { home } ) => {
10531053 //Act
10541054 await home . scrollDownPage ( ) ;
1055- await expect ( home . footer . headerSubscription ) . toBeInViewport ( ) ;
1055+ await home . footer . isHeaderSubscriptionVisible ( ) ;
10561056 await home . takeScreenShot ( 'footer' ) ;
10571057 await home . clickScrollUpArrow ( ) ;
1058- await expect ( home . headerFullFledged ) . toBeInViewport ( ) ;
1058+ await home . isHeaderFullFledgedInViewPort ( ) ;
10591059 await home . takeScreenShot ( 'header' ) ;
10601060
10611061 //Assert
@@ -1076,10 +1076,10 @@ test.describe('Test for test cases', { tag: ['@reg'] }, () => {
10761076 test ( 'Case 26: Verify Scroll Up without "Arrow" button and Scroll Down functionality' , async ( { home } ) => {
10771077 //Act
10781078 await home . scrollDownPage ( ) ;
1079- await expect ( home . footer . headerSubscription ) . toBeInViewport ( ) ;
1079+ await home . footer . isHeaderSubscriptionVisible ( ) ;
10801080 await home . takeScreenShot ( 'up-arrow' ) ;
10811081 await home . scrollUpPage ( ) ;
1082- await expect ( home . headerFullFledged ) . toBeInViewport ( ) ;
1082+ await home . isHeaderFullFledgedInViewPort ( ) ;
10831083 await home . giveMeSmallSecond ( ) ;
10841084 await home . takeScreenShot ( 'no-arrow' ) ;
10851085
0 commit comments