File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
frontend/src/__tests__/app/message-plans/create-message-plan Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,6 @@ describe('CreateMessagePlanPage', () => {
6868
6969 await user . click ( screen . getByTestId ( 'submit-button' ) ) ;
7070
71- expect ( container . asFragment ( ) ) . toMatchSnapshot ( ) ;
72-
7371 expect ( createMessagePlanServerAction ) . toHaveBeenCalledTimes ( 1 ) ;
7472 expect ( createMessagePlanServerAction ) . toHaveBeenCalledWith (
7573 { } ,
@@ -86,13 +84,14 @@ describe('CreateMessagePlanPage', () => {
8684 name : 'My Message Plan' ,
8785 } ) ;
8886
89- const errorSummaryHeading = await screen . getByTestId ( 'error-summary' ) ;
90-
91- // "error-summary" test id targets the nested heading rather than the top level of the error summary
87+ // error-summary" test id targets the nested heading rather than the top level of the error summary
9288 // so we need to assert against the parent element
93- await waitFor ( ( ) => {
89+ await waitFor ( async ( ) => {
90+ const errorSummaryHeading = await screen . getByTestId ( 'error-summary' ) ;
9491 expect ( errorSummaryHeading . parentElement ) . toHaveFocus ( ) ;
9592 } ) ;
93+
94+ expect ( container . asFragment ( ) ) . toMatchSnapshot ( ) ;
9695 } ) ;
9796
9897 test ( 'redirects when there are no campaignIds' , async ( ) => {
You can’t perform that action at this time.
0 commit comments