@@ -10,8 +10,8 @@ import { setupServer } from 'msw/node'
1010import { BACKEND_FOR_FRONTEND_URL } from '@/config/env'
1111import { act , fireEvent , screen , waitFor , waitForElementToBeRemoved } from '@testing-library/react'
1212
13- vi . mock ( '../../ components/dialogs/DialogCreateAgreementDraft/DialogCreateAgreementDraft ' , ( ) => ( {
14- DialogCreateAgreementDraft : ( ) => < div > DialogCreateAgreementDraft </ div > ,
13+ vi . mock ( '@/ components/dialogs/DialogSelectAgreementConsumer/DialogSelectAgreementConsumer ' , ( ) => ( {
14+ DialogSelectAgreementConsumer : ( ) => < div > DialogSelectAgreementConsumer </ div > ,
1515} ) )
1616
1717const server = setupServer (
@@ -126,7 +126,7 @@ describe('useGetEServiceConsumerActions tests - actions', () => {
126126 } )
127127
128128 await waitFor ( ( ) => {
129- expect ( screen . getByRole ( 'button' , { name : 'actions.inspect' } ) ) . toBeInTheDocument ( )
129+ expect ( screen . getByText ( 'DialogSelectAgreementConsumer' ) ) . toBeInTheDocument ( )
130130 } )
131131 } )
132132
@@ -189,7 +189,7 @@ describe('useGetEServiceConsumerActions tests - actions', () => {
189189 } )
190190
191191 await waitFor ( ( ) => {
192- expect ( screen . getByRole ( 'button' , { name : 'actions.edit' } ) ) . toBeInTheDocument ( )
192+ expect ( screen . getByText ( 'DialogSelectAgreementConsumer' ) ) . toBeInTheDocument ( )
193193 } )
194194 } )
195195
@@ -350,8 +350,7 @@ describe('useGetEServiceConsumerActions tests - actions', () => {
350350 } )
351351
352352 await waitFor ( ( ) => {
353- expect ( screen . getByText ( 'DialogCreateAgreementDraft' ) ) . toBeInTheDocument ( )
354- // expect(screen.getByRole('button', { name: 'createNewDraft' })).toBeInTheDocument()
353+ expect ( screen . getByText ( 'DialogSelectAgreementConsumer' ) ) . toBeInTheDocument ( )
355354 } )
356355 } )
357356
0 commit comments