@@ -135,7 +135,7 @@ describe('TerminationSummary', () => {
135135 renderWithProviders ( < TerminationSummary { ...defaultProps } /> )
136136
137137 await waitFor ( ( ) => {
138- expect ( screen . getByRole ( 'button' , { name : 'Edit dismissal ' } ) ) . toBeInTheDocument ( )
138+ expect ( screen . getByRole ( 'button' , { name : 'Edit termination ' } ) ) . toBeInTheDocument ( )
139139 } )
140140 } )
141141
@@ -152,7 +152,7 @@ describe('TerminationSummary', () => {
152152 expect ( screen . getByText ( 'John Doe has been successfully terminated' ) ) . toBeInTheDocument ( )
153153 } )
154154
155- expect ( screen . queryByRole ( 'button' , { name : 'Edit dismissal ' } ) ) . not . toBeInTheDocument ( )
155+ expect ( screen . queryByRole ( 'button' , { name : 'Edit termination ' } ) ) . not . toBeInTheDocument ( )
156156 } )
157157
158158 it ( 'shows run payroll button when dismissal payroll was selected' , async ( ) => {
@@ -165,7 +165,7 @@ describe('TerminationSummary', () => {
165165 renderWithProviders ( < TerminationSummary { ...defaultProps } /> )
166166
167167 await waitFor ( ( ) => {
168- expect ( screen . getByRole ( 'button' , { name : 'Run dismissal payroll' } ) ) . toBeInTheDocument ( )
168+ expect ( screen . getByRole ( 'button' , { name : 'Run termination payroll' } ) ) . toBeInTheDocument ( )
169169 } )
170170 } )
171171
@@ -183,7 +183,7 @@ describe('TerminationSummary', () => {
183183 } )
184184
185185 expect (
186- screen . queryByRole ( 'button' , { name : 'Run dismissal payroll' } ) ,
186+ screen . queryByRole ( 'button' , { name : 'Run termination payroll' } ) ,
187187 ) . not . toBeInTheDocument ( )
188188 } )
189189 } )
@@ -207,6 +207,12 @@ describe('TerminationSummary', () => {
207207
208208 await user . click ( screen . getByRole ( 'button' , { name : 'Cancel termination' } ) )
209209
210+ await waitFor ( ( ) => {
211+ expect ( screen . getByRole ( 'button' , { name : 'Yes, cancel termination' } ) ) . toBeInTheDocument ( )
212+ } )
213+
214+ await user . click ( screen . getByRole ( 'button' , { name : 'Yes, cancel termination' } ) )
215+
210216 await waitFor ( ( ) => {
211217 expect ( onEvent ) . toHaveBeenCalledWith (
212218 componentEvents . EMPLOYEE_TERMINATION_CANCELLED ,
@@ -227,10 +233,10 @@ describe('TerminationSummary', () => {
227233 renderWithProviders ( < TerminationSummary { ...defaultProps } /> )
228234
229235 await waitFor ( ( ) => {
230- expect ( screen . getByRole ( 'button' , { name : 'Edit dismissal ' } ) ) . toBeInTheDocument ( )
236+ expect ( screen . getByRole ( 'button' , { name : 'Edit termination ' } ) ) . toBeInTheDocument ( )
231237 } )
232238
233- await user . click ( screen . getByRole ( 'button' , { name : 'Edit dismissal ' } ) )
239+ await user . click ( screen . getByRole ( 'button' , { name : 'Edit termination ' } ) )
234240
235241 expect ( onEvent ) . toHaveBeenCalledWith (
236242 componentEvents . EMPLOYEE_TERMINATION_EDIT ,
@@ -250,10 +256,10 @@ describe('TerminationSummary', () => {
250256 renderWithProviders ( < TerminationSummary { ...defaultProps } /> )
251257
252258 await waitFor ( ( ) => {
253- expect ( screen . getByRole ( 'button' , { name : 'Run dismissal payroll' } ) ) . toBeInTheDocument ( )
259+ expect ( screen . getByRole ( 'button' , { name : 'Run termination payroll' } ) ) . toBeInTheDocument ( )
254260 } )
255261
256- await user . click ( screen . getByRole ( 'button' , { name : 'Run dismissal payroll' } ) )
262+ await user . click ( screen . getByRole ( 'button' , { name : 'Run termination payroll' } ) )
257263
258264 expect ( onEvent ) . toHaveBeenCalledWith (
259265 componentEvents . EMPLOYEE_TERMINATION_RUN_PAYROLL ,
0 commit comments