Skip to content

Commit a38c2a1

Browse files
committed
update tests
1 parent d24342b commit a38c2a1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/hooks/__tests__/useGetEServiceConsumerActions.test.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { setupServer } from 'msw/node'
1010
import { BACKEND_FOR_FRONTEND_URL } from '@/config/env'
1111
import { 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

1717
const 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

Comments
 (0)