@@ -33,7 +33,7 @@ describe('Recurring contributions', () => {
3333 } ) ;
3434
3535 it ( 'Has contributions in the right categories' , ( ) => {
36- cy . login ( { email : user . email , redirect : `/dashboard/${ user . collective . slug } /outgoing-contributions` } ) . then ( ( ) => {
36+ cy . login ( { email : user . email , redirect : `/dashboard/${ user . slug } /outgoing-contributions` } ) . then ( ( ) => {
3737 // Filter by Yearly frequency
3838 cy . getByDataCy ( 'add-filter' ) . click ( ) ;
3939 cy . contains ( 'Frequency' ) . click ( ) ;
@@ -57,22 +57,20 @@ describe('Recurring contributions', () => {
5757 } ,
5858 } ,
5959 ( ) => {
60- cy . login ( { email : user . email , redirect : `/dashboard/${ user . collective . slug } /outgoing-contributions` } ) . then (
61- ( ) => {
62- cy . getByDataCy ( 'actions-menu-trigger' ) . first ( ) . click ( ) ;
63- cy . contains ( 'Update payment method' ) . click ( ) ;
64- cy . get ( 'input[type=radio][value="stripe-payment-element"]' ) . check ( ) ;
65- cy . wait ( 500 ) ;
66- cy . fillStripePaymentElementInput ( ) ;
67- cy . getByDataCy ( 'recurring-contribution-submit-pm-button' ) . click ( ) ;
68- cy . getByDataCy ( 'toast-notification' ) . contains ( 'Your recurring contribution has been updated.' ) ;
69- } ,
70- ) ;
60+ cy . login ( { email : user . email , redirect : `/dashboard/${ user . slug } /outgoing-contributions` } ) . then ( ( ) => {
61+ cy . getByDataCy ( 'actions-menu-trigger' ) . first ( ) . click ( ) ;
62+ cy . contains ( 'Update payment method' ) . click ( ) ;
63+ cy . get ( 'input[type=radio][value="stripe-payment-element"]' ) . check ( ) ;
64+ cy . wait ( 500 ) ;
65+ cy . fillStripePaymentElementInput ( ) ;
66+ cy . getByDataCy ( 'recurring-contribution-submit-pm-button' ) . click ( ) ;
67+ cy . getByDataCy ( 'toast-notification' ) . contains ( 'Your recurring contribution has been updated.' ) ;
68+ } ) ;
7169 } ,
7270 ) ;
7371
7472 it ( 'Can change the tier and amount of the order' , ( ) => {
75- cy . login ( { email : user . email , redirect : `/dashboard/${ user . collective . slug } /outgoing-contributions` } ) . then ( ( ) => {
73+ cy . login ( { email : user . email , redirect : `/dashboard/${ user . slug } /outgoing-contributions` } ) . then ( ( ) => {
7674 cy . getByDataCy ( 'actions-menu-trigger' ) . first ( ) . click ( ) ;
7775 cy . contains ( 'Update amount' ) . click ( ) ;
7876 cy . contains ( '[data-cy="recurring-contribution-tier-box"]' , 'Backer' ) . within ( ( ) => {
@@ -85,7 +83,7 @@ describe('Recurring contributions', () => {
8583 } ) ;
8684
8785 it ( 'Can select a fixed recurring contribution tier' , ( ) => {
88- cy . login ( { email : user . email , redirect : `/dashboard/${ user . collective . slug } /outgoing-contributions` } ) . then ( ( ) => {
86+ cy . login ( { email : user . email , redirect : `/dashboard/${ user . slug } /outgoing-contributions` } ) . then ( ( ) => {
8987 cy . getByDataCy ( 'actions-menu-trigger' ) . first ( ) . click ( ) ;
9088 cy . contains ( 'Update amount' ) . click ( ) ;
9189 cy . contains ( '[data-cy="recurring-contribution-tier-box"]' , 'Recurring Fixed Donation Tier' ) . within ( ( ) => {
@@ -98,7 +96,7 @@ describe('Recurring contributions', () => {
9896 } ) ;
9997
10098 it ( 'Can change the amount in a flexible contribution tier' , ( ) => {
101- cy . login ( { email : user . email , redirect : `/dashboard/${ user . collective . slug } /outgoing-contributions` } ) . then ( ( ) => {
99+ cy . login ( { email : user . email , redirect : `/dashboard/${ user . slug } /outgoing-contributions` } ) . then ( ( ) => {
102100 cy . getByDataCy ( 'actions-menu-trigger' ) . first ( ) . click ( ) ;
103101 cy . contains ( 'Update amount' ) . click ( ) ;
104102 cy . contains ( '[data-cy="recurring-contribution-tier-box"]' , 'Sponsor' ) . within ( ( ) => {
@@ -113,7 +111,7 @@ describe('Recurring contributions', () => {
113111 } ) ;
114112
115113 it ( 'Can contribute a custom contribution amount' , ( ) => {
116- cy . login ( { email : user . email , redirect : `/dashboard/${ user . collective . slug } /outgoing-contributions` } ) . then ( ( ) => {
114+ cy . login ( { email : user . email , redirect : `/dashboard/${ user . slug } /outgoing-contributions` } ) . then ( ( ) => {
117115 cy . getByDataCy ( 'actions-menu-trigger' ) . first ( ) . click ( ) ;
118116 cy . contains ( 'Update amount' ) . click ( ) ;
119117 cy . contains ( '[data-cy="recurring-contribution-tier-box"]' , 'Sponsor' ) . within ( ( ) => {
@@ -133,7 +131,7 @@ describe('Recurring contributions', () => {
133131 } ) ;
134132
135133 it ( 'Cannot contribute a contribution amount less than the minimum allowable amount' , ( ) => {
136- cy . login ( { email : user . email , redirect : `/dashboard/${ user . collective . slug } /outgoing-contributions` } ) . then ( ( ) => {
134+ cy . login ( { email : user . email , redirect : `/dashboard/${ user . slug } /outgoing-contributions` } ) . then ( ( ) => {
137135 cy . getByDataCy ( 'actions-menu-trigger' ) . first ( ) . click ( ) ;
138136 cy . contains ( 'Update amount' ) . click ( ) ;
139137 cy . contains ( '[data-cy="recurring-contribution-tier-box"]' , 'Sponsor' ) . within ( ( ) => {
@@ -153,7 +151,7 @@ describe('Recurring contributions', () => {
153151
154152 it ( 'Can cancel an active contribution with reasons displayed in modal, "other" displays text area' , ( ) => {
155153 cy . mailpitDeleteAllEmails ( ) ;
156- cy . login ( { email : user . email , redirect : `/dashboard/${ user . collective . slug } /outgoing-contributions` } ) . then ( ( ) => {
154+ cy . login ( { email : user . email , redirect : `/dashboard/${ user . slug } /outgoing-contributions` } ) . then ( ( ) => {
157155 cy . getByDataCy ( 'actions-menu-trigger' ) . first ( ) . click ( ) ;
158156 cy . getByDataCy ( 'recurring-contribution-menu-cancel-option' ) . click ( ) ;
159157 cy . getByDataCy ( 'cancel-order-modal' ) . should ( 'exist' ) ;
0 commit comments