@@ -4,37 +4,6 @@ export function loginSuccessfully() {
4
4
cy . get ( '.cx-login-greet' ) . should ( 'contain' , 'Test User' ) ;
5
5
}
6
6
7
- export function addShippingAddress ( ) {
8
- cy . request ( {
9
- method : 'POST' ,
10
- url : `${ Cypress . env (
11
- 'API_URL'
12
- ) } /rest/v2/electronics-spa/users/test-user-cypress@ydev.hybris.com/addresses?lang=en&curr=USD`,
13
- headers : {
14
- Authorization : `bearer ${
15
- JSON . parse ( sessionStorage . getItem ( 'auth' ) ) . userToken . token [
16
- 'access_token'
17
- ]
18
- } `,
19
- } ,
20
- body : {
21
- defaultAddress : false ,
22
- titleCode : 'mr' ,
23
- firstName : 'Test' ,
24
- lastName : 'User' ,
25
- line1 : '999 de Maisonneuve' ,
26
- line2 : '' ,
27
- town : 'Montreal' ,
28
- region : { isocode : 'US-AK' } ,
29
- country : { isocode : 'US' } ,
30
- postalCode : 'H4B3L4' ,
31
- phone : '' ,
32
- } ,
33
- } ) . then ( response => {
34
- expect ( response . status ) . to . eq ( 201 ) ;
35
- } ) ;
36
- }
37
-
38
7
export function changePageFromProductToCategory ( ) {
39
8
// click big banner
40
9
cy . get ( '.Section1 cx-responsive-banner' )
@@ -163,24 +132,3 @@ export function displaySummaryPage() {
163
132
cy . get ( 'cx-cart-item .cx-code' ) . should ( 'contain' , product . code ) ;
164
133
cy . get ( 'cx-order-summary .cx-summary-amount' ) . should ( 'not.be.empty' ) ;
165
134
}
166
-
167
- export function deleteShippingAddress ( ) {
168
- cy . visit ( '/my-account/address-book' ) ;
169
- cy . getByText ( 'delete' )
170
- . first ( )
171
- . click ( ) ;
172
- cy . get ( '.cx-address-card--delete-mode button.btn-primary' ) . click ( ) ;
173
- cy . get ( 'cx-global-message' ) . contains ( 'Address deleted successfully!' ) ;
174
- }
175
-
176
- export function deletePaymentMethod ( ) {
177
- cy . visit ( '/my-account/payment-details' ) ;
178
- cy . getByText ( 'Delete' )
179
- . first ( )
180
- . click ( ) ;
181
- cy . get ( '.btn-primary' ) . should ( 'contain' , 'delete' ) ;
182
- cy . get ( '.btn-primary' ) . click ( ) ;
183
- cy . get ( '.cx-payment .cx-body' ) . then ( ( ) => {
184
- cy . get ( 'cx-card' ) . should ( 'not.exist' ) ;
185
- } ) ;
186
- }
0 commit comments