1- import { toMembersDataApiResponse } from '../../../../client/fixtures/mdapiResponse' ;
21import { tierThree } from '../../../../client/fixtures/productBuilder/testProducts' ;
2+ import { toMembersDataApiResponse } from '../../../../client/fixtures/mdapiResponse' ;
33import { signInAndAcceptCookies } from '../../../lib/signInAndAcceptCookies' ;
44
55describe ( 'Cancel tier three' , ( ) => {
@@ -86,9 +86,6 @@ describe('Cancel tier three', () => {
8686 } ) ;
8787
8888 it ( 'cancels tier three (reason: I dont have time to use my subscription, effective: next billing date)' , ( ) => {
89- const feedback =
90- 'I still value the journalism, but this no longer fits my budget right now.' ;
91-
9289 cy . visit ( '/' ) ;
9390
9491 cy . findByText ( 'Manage subscription' ) . click ( ) ;
@@ -98,38 +95,27 @@ describe('Cancel tier three', () => {
9895 name : 'Cancel subscription' ,
9996 } ) . click ( ) ;
10097
101- cy . findByText ( "We're sorry to see you go" ) . should ( 'exist' ) ;
102- cy . contains ( 'multiple/multiple' ) . should ( 'not.exist' ) ;
103- cy . contains ( 'multiple account plan' ) . should ( 'exist' ) ;
98+ cy . findByText (
99+ 'We’re sorry to hear you’re thinking of cancelling your digital + print subscription' ,
100+ ) . should ( 'exist' ) ;
104101
105102 cy . findAllByRole ( 'radio' ) . eq ( 6 ) . click ( ) ;
106- cy . findByRole ( 'textbox' ) . type ( feedback ) ;
107103
108- cy . findByRole ( 'button' , { name : 'Continue to Cancel' } ) . click ( ) ;
104+ cy . findAllByRole ( 'radio' ) . check ( 'Today' ) ;
105+ cy . findByRole ( 'button' , { name : 'Continue' } ) . click ( ) ;
109106
110107 cy . wait ( '@get_case' ) ;
111108
112- cy . findByText ( 'Pause your subscription' ) . should ( 'exist' ) ;
113- cy . findByRole ( 'button' , { name : 'Previous' } ) . click ( ) ;
114- cy . findAllByRole ( 'radio' ) . eq ( 6 ) . should ( 'be.checked' ) ;
115- cy . findByRole ( 'textbox' ) . should ( 'have.value' , feedback ) ;
116- cy . findByRole ( 'button' , { name : 'Continue to Cancel' } ) . click ( ) ;
117-
118- cy . findByRole ( 'button' , { name : 'Continue to cancel' } ) . click ( ) ;
109+ cy . findByRole ( 'button' , { name : 'Confirm cancellation' } ) . click ( ) ;
119110
120111 cy . wait ( '@cancel_gw_holidays' ) ;
121112 cy . wait ( '@cancel_gw_deliveryrecords' ) ;
113+ cy . wait ( '@create_case_in_salesforce' ) ;
122114
123115 cy . findByText (
124- 'test, thank you for supporting the Guardian since 29 November 2021. Is this really goodbye? ' ,
116+ 'Your cancellation request has been successfully submitted. Our customer service team will try their best to contact you as soon as possible to confirm the cancellation and refund any credit you are owed. ' ,
125117 ) . should ( 'exist' ) ;
126- cy . findByRole ( 'button' , { name : 'Confirm cancellation' } ) . click ( ) ;
127118
128- cy . findByText (
129- 'Your subscription to Digital + Print has been cancelled.' ,
130- ) . should ( 'exist' ) ;
131- cy . findByText (
132- 'Your cancellation will take effect on 25 Jul 2024.' ,
133- ) . should ( 'exist' ) ;
119+ cy . get ( '@get_cancellation_date.all' ) . should ( 'have.length' , 1 ) ;
134120 } ) ;
135121} ) ;
0 commit comments