@@ -390,7 +390,7 @@ describe("Checkout customer address", () => {
390390 } )
391391 } )
392392
393- context ( "initial order with differend address" , ( ) => {
393+ context ( "initial order with different address" , ( ) => {
394394 before ( function ( ) {
395395 cy . getTokenCustomer ( {
396396 username : email ,
@@ -1030,7 +1030,7 @@ describe("Checkout customer address", () => {
10301030 } )
10311031 } )
10321032
1033- context ( "initial order empty with country lock" , ( ) => {
1033+ context . only ( "initial order empty with country lock" , ( ) => {
10341034 let requires_billing_info = false
10351035 const emailTemp = faker . internet . email ( ) . toLocaleLowerCase ( )
10361036 const passwordTemp = faker . internet . password ( )
@@ -1125,6 +1125,16 @@ describe("Checkout customer address", () => {
11251125 } )
11261126
11271127 it ( "select first address and save" , ( ) => {
1128+ cy . dataCy ( "customer-billing-address" ) . should (
1129+ "contain.text" ,
1130+ `${ euAddress . firstName } ${ euAddress . lastName } `
1131+ )
1132+
1133+ cy . dataCy ( "customer-billing-address" ) . should (
1134+ "contain.text" ,
1135+ `${ euAddress2 . firstName } ${ euAddress2 . lastName } `
1136+ )
1137+
11281138 cy . dataCy ( "customer-billing-address" )
11291139 . contains ( "p" , euAddress . firstName )
11301140 . click ( )
@@ -1154,12 +1164,12 @@ describe("Checkout customer address", () => {
11541164 cy . wait ( "@deliveryLeadTimes" )
11551165 } )
11561166
1157- it ( "select second address and save is disabled " , ( ) => {
1167+ it ( "select second address and ship to different address should be enabled " , ( ) => {
11581168 cy . dataCy ( "step_customer" )
11591169 . click ( )
11601170 . should ( "have.attr" , "data-status" , "true" )
11611171
1162- cy . wait ( 1500 )
1172+ cy . dataCy ( "shipping-address" ) . should ( "not.be.visible" )
11631173
11641174 cy . dataCy ( "customer-billing-address" )
11651175 . contains ( "p" , euAddress2 . firstName )
@@ -1168,8 +1178,19 @@ describe("Checkout customer address", () => {
11681178 cy . wait ( "@updateAddress" , {
11691179 timeout : 100000 ,
11701180 } )
1181+ cy . wait ( 1500 )
1182+ cy . dataCy ( "shipping-address" ) . should ( "be.visible" )
1183+ cy . dataCy ( "shipping-address" ) . should ( "contain" , "Indirizzo di spedizione" )
1184+ cy . dataCy ( "customer-shipping-address" ) . should (
1185+ "contain" ,
1186+ `${ euAddress . firstName } ${ euAddress . lastName } `
1187+ )
1188+ cy . dataCy ( "customer-shipping-address" ) . should (
1189+ "not.contain" ,
1190+ `${ euAddress2 . firstName } ${ euAddress2 . lastName } `
1191+ )
11711192
1172- cy . dataCy ( "save-addresses-button" ) . should ( "be.disabled " )
1193+ cy . dataCy ( "save-addresses-button" ) . should ( "be.enabled " )
11731194 } )
11741195
11751196 it ( "check billing information" , ( ) => {
@@ -1182,7 +1203,7 @@ describe("Checkout customer address", () => {
11821203 cy . wait ( "@deliveryLeadTimes" )
11831204 } )
11841205
1185- it ( "add custom billing address and save is disabled " , function ( ) {
1206+ it ( "add custom billing address and save is enabled " , function ( ) {
11861207 cy . dataCy ( "step_customer" )
11871208 . click ( )
11881209 . should ( "have.attr" , "data-status" , "true" )
@@ -1197,7 +1218,10 @@ describe("Checkout customer address", () => {
11971218 requiresBillingInfo : requires_billing_info ,
11981219 } )
11991220
1200- cy . dataCy ( "save-addresses-button" ) . should ( "be.disabled" )
1221+ cy . dataCy ( "customer-shipping-address" ) . should ( "contain" , "GE (IT)" )
1222+ cy . dataCy ( "customer-shipping-address" ) . should ( "not.contain" , "RE (FR)" )
1223+
1224+ cy . dataCy ( "save-addresses-button" ) . should ( "be.enabled" )
12011225 } )
12021226
12031227 it ( "change billing address country code and save" , ( ) => {
0 commit comments