@@ -12,12 +12,12 @@ test('test cart functionality behaves as expected', { tag: ['@SANITY'] }, async
1212 let jacketSize : string = 'L' ;
1313 let cartInitialPrice : string = '$42.00' ;
1414 let cartUpdatedPrice : string = '$84.00' ;
15- let shippingTotalPrice : string = '' ;
1615 let itemInStock : string = 'In Stock' ;
1716 let updateQty : string = '2' ;
1817 let shippingMethod : string = 'Best Way' ;
1918 let orderTotal : string = 'Order Total' ;
2019 let updatedSize : string = 'XL'
20+ let updatedColor : string = 'Black'
2121 let purchaseConfirmation : string = 'Thank you for your purchase!' ;
2222 let expectedUserAddressDetails : string [ ] = [ 'John Doe' , 'Jump Street 20' , 'Miami, Florida 1000 P.O' , 'United States' , '55555' ] ;
2323 await test . step ( 'navigaet to mens category, hover over tops and choose hoodies and sweatshirts sub category' , async ( ) => {
@@ -38,7 +38,7 @@ test('test cart functionality behaves as expected', { tag: ['@SANITY'] }, async
3838 } )
3939 await test . step ( 'validate the item is in stock and change the quantity to 2 then click on update cart' , async ( ) => {
4040 await productPage . validateProductStockAvailability ( itemInStock ) ;
41- await productPage . itemShoppingPage . chooseProductItem ( jacketName , { modifyQuantity : true , quantity : updateQty , chooseSize : true , size : updatedSize } ) ;
41+ await productPage . itemShoppingPage . chooseProductItem ( jacketName , { modifyQuantity : true , quantity : updateQty , chooseSize : true , size : updatedSize , chooseColor : true , color : updatedColor } ) ;
4242 await productPage . updateCart ( ) ;
4343 } )
4444 await test . step ( 'validate price changed after adding another quantity then proceed to checkout' , async ( ) => {
@@ -50,7 +50,7 @@ test('test cart functionality behaves as expected', { tag: ['@SANITY'] }, async
5050 await checkoutShippingPage . clickNext ( ) ;
5151 } )
5252 await test . step ( 'validate cart subtotal then place order and validate order was successfully made' , async ( ) => {
53- await checkoutPaymentPage . validateOrderSummaryExpenses ( orderTotal , '$114.00' ) ;
53+ await checkoutPaymentPage . validateOrderSummaryExpenses ( orderTotal , cartUpdatedPrice ) ;
5454 await checkoutPaymentPage . clickPlaceOrder ( ) ;
5555 await checkoutPaymentPage . validatePurchaseConfirmationMessage ( purchaseConfirmation ) ;
5656 } )
0 commit comments