Skip to content

Commit

Permalink
Vis årsak når det er tilbakekrevings-revurderinger (#6816)
Browse files Browse the repository at this point in the history
* Vis årsak når det er tilbakekrevings-revurderinger

* Fiks feilende test
  • Loading branch information
selbekk authored Nov 14, 2024
1 parent a3276be commit c07485a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('<NyBehandlingModal>', () => {

expect(screen.getByRole('dialog', { name: 'Ny behandling' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Opprett behandling' })).toBeInTheDocument();
expect(screen.getAllByRole('combobox').length).toBe(1);
expect(screen.getAllByRole('combobox').length).toBe(2);
});

it('skal bruke submit-callback når en trykker lagre', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ export const NyBehandlingModal = ({
}, []);
const erFørstegangsbehandling = valgtBehandlingTypeKode === bType.FORSTEGANGSSOKNAD;
const erRevurdering = valgtBehandlingTypeKode === bType.REVURDERING;
const visÅrsak = erRevurdering && steg === 'inngangsvilkår';
const visÅrsak =
(erRevurdering && steg === 'inngangsvilkår') || (!erRevurdering && behandlingArsakTyper.length > 0);
return (
<Modal
className={styles.modal}
Expand Down

0 comments on commit c07485a

Please sign in to comment.