Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mgunnerud committed Dec 19, 2023
1 parent 3f71993 commit 9beb092
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('PartyListDetail', () => {

const nameField = screen.getByLabelText(textMock('resourceadm.listadmin_list_name'));
await act(() => user.type(nameField, ' endret'));
act(() => nameField.blur());
await act(() => nameField.blur());

expect(updatePartyListMock).toHaveBeenCalledWith(testOrg, testListeIdentifier, testEnv, [
{ op: 'replace', path: '/name', value: 'Test-liste endret' },
Expand All @@ -95,7 +95,7 @@ describe('PartyListDetail', () => {
textMock('resourceadm.listadmin_list_description'),
);
await act(() => user.type(descriptionField, ' endret'));
act(() => descriptionField.blur());
await act(() => descriptionField.blur());

expect(updatePartyListMock).toHaveBeenCalledWith(testOrg, testListeIdentifier, testEnv, [
{ op: 'replace', path: '/description', value: 'Dette er en beskrivelse endret' },
Expand All @@ -110,7 +110,7 @@ describe('PartyListDetail', () => {
textMock('resourceadm.listadmin_list_description'),
);
await act(() => user.clear(descriptionField));
act(() => descriptionField.blur());
await act(() => descriptionField.blur());

expect(updatePartyListMock).toHaveBeenCalledWith(testOrg, testListeIdentifier, testEnv, [
{ op: 'remove', path: '/description' },
Expand Down

0 comments on commit 9beb092

Please sign in to comment.