test(frontend): add failing tests for step 1 - entity task workflow

This commit is contained in:
2026-03-26 20:28:53 -03:00
parent 860d5f24bd
commit 381c6cbfcd
3 changed files with 152 additions and 0 deletions

View File

@@ -57,4 +57,13 @@ describe('EntitiesPage', () => {
expect(entitiesApi.deleteEntity).toHaveBeenCalledWith('entity-1')
})
})
it('should_renderDetailLink_when_entitiesLoaded', async () => {
vi.mocked(entitiesApi.getEntities).mockResolvedValue([mockEntity])
render(<EntitiesPage />, { wrapper })
await waitFor(() => {
expect(screen.getByRole('link', { name: /open details/i })).toHaveAttribute('href', '/entities/entity-1')
})
})
})