@@ -63,7 +63,7 @@ describe("PaymentForm", () => {
63
63
const topUpInput = await screen . findByTestId ( "top-up-input" ) ;
64
64
await user . type ( topUpInput , "50.12" ) ;
65
65
66
- const topUpButton = screen . getByText ( "Add credit " ) ;
66
+ const topUpButton = screen . getByText ( "PAYMENT$ADD_CREDIT " ) ;
67
67
await user . click ( topUpButton ) ;
68
68
69
69
expect ( createCheckoutSessionSpy ) . toHaveBeenCalledWith ( 50.12 ) ;
@@ -76,7 +76,7 @@ describe("PaymentForm", () => {
76
76
const topUpInput = await screen . findByTestId ( "top-up-input" ) ;
77
77
await user . type ( topUpInput , "50.125456" ) ;
78
78
79
- const topUpButton = screen . getByText ( "Add credit " ) ;
79
+ const topUpButton = screen . getByText ( "PAYMENT$ADD_CREDIT " ) ;
80
80
await user . click ( topUpButton ) ;
81
81
82
82
expect ( createCheckoutSessionSpy ) . toHaveBeenCalledWith ( 50.13 ) ;
@@ -86,7 +86,7 @@ describe("PaymentForm", () => {
86
86
const user = userEvent . setup ( ) ;
87
87
renderPaymentForm ( ) ;
88
88
89
- const topUpButton = screen . getByText ( "Add credit " ) ;
89
+ const topUpButton = screen . getByText ( "PAYMENT$ADD_CREDIT " ) ;
90
90
expect ( topUpButton ) . toBeDisabled ( ) ;
91
91
92
92
const topUpInput = await screen . findByTestId ( "top-up-input" ) ;
@@ -102,7 +102,7 @@ describe("PaymentForm", () => {
102
102
const topUpInput = await screen . findByTestId ( "top-up-input" ) ;
103
103
await user . type ( topUpInput , "50.12" ) ;
104
104
105
- const topUpButton = screen . getByText ( "Add credit " ) ;
105
+ const topUpButton = screen . getByText ( "PAYMENT$ADD_CREDIT " ) ;
106
106
await user . click ( topUpButton ) ;
107
107
108
108
expect ( topUpButton ) . toBeDisabled ( ) ;
@@ -116,7 +116,7 @@ describe("PaymentForm", () => {
116
116
const topUpInput = await screen . findByTestId ( "top-up-input" ) ;
117
117
await user . type ( topUpInput , "-50.12" ) ;
118
118
119
- const topUpButton = screen . getByText ( "Add credit " ) ;
119
+ const topUpButton = screen . getByText ( "PAYMENT$ADD_CREDIT " ) ;
120
120
await user . click ( topUpButton ) ;
121
121
122
122
expect ( createCheckoutSessionSpy ) . not . toHaveBeenCalled ( ) ;
@@ -129,7 +129,7 @@ describe("PaymentForm", () => {
129
129
const topUpInput = await screen . findByTestId ( "top-up-input" ) ;
130
130
await user . type ( topUpInput , " " ) ;
131
131
132
- const topUpButton = screen . getByText ( "Add credit " ) ;
132
+ const topUpButton = screen . getByText ( "PAYMENT$ADD_CREDIT " ) ;
133
133
await user . click ( topUpButton ) ;
134
134
135
135
expect ( createCheckoutSessionSpy ) . not . toHaveBeenCalled ( ) ;
@@ -142,7 +142,7 @@ describe("PaymentForm", () => {
142
142
const topUpInput = await screen . findByTestId ( "top-up-input" ) ;
143
143
await user . type ( topUpInput , "abc" ) ;
144
144
145
- const topUpButton = screen . getByText ( "Add credit " ) ;
145
+ const topUpButton = screen . getByText ( "PAYMENT$ADD_CREDIT " ) ;
146
146
await user . click ( topUpButton ) ;
147
147
148
148
expect ( createCheckoutSessionSpy ) . not . toHaveBeenCalled ( ) ;
@@ -155,7 +155,7 @@ describe("PaymentForm", () => {
155
155
const topUpInput = await screen . findByTestId ( "top-up-input" ) ;
156
156
await user . type ( topUpInput , "9" ) ; // test assumes the minimum is 10
157
157
158
- const topUpButton = screen . getByText ( "Add credit " ) ;
158
+ const topUpButton = screen . getByText ( "PAYMENT$ADD_CREDIT " ) ;
159
159
await user . click ( topUpButton ) ;
160
160
161
161
expect ( createCheckoutSessionSpy ) . not . toHaveBeenCalled ( ) ;
0 commit comments