Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"http-server": "14.1.1",
"husky": "9.1.7",
"identity-obj-proxy": "3.0.0",
"jest": "29.7.0",
"jest": "30.0.2",
"jest-environment-jsdom": "29.7.0",
"jest-junit": "16.0.0",
"jest-mock-axios": "4.8.0",
Expand Down
6 changes: 3 additions & 3 deletions src/features/instantiate/selection/InstanceSelection.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('InstanceSelection', () => {
it('pressing "Start på nytt" should trigger callback', async () => {
const { mutations } = await render();
await userEvent.click(screen.getByText(/start på nytt/i));
expect(mutations.doInstantiate.mock).toBeCalledTimes(1);
expect(mutations.doInstantiate.mock).toHaveBeenCalledTimes(1);
});

it('should trigger openInstance on editButton click', async () => {
Expand All @@ -88,7 +88,7 @@ describe('InstanceSelection', () => {

await userEvent.click(button);
expect(window.location.href).toBe('https://local.altinn.cloud/ttd/test#/instance/some-id');
expect(mutations.doInstantiate.mock).toBeCalledTimes(0);
expect(mutations.doInstantiate.mock).toHaveBeenCalledTimes(0);
});

it('should trigger openInstance on editButton click during mobile view', async () => {
Expand All @@ -107,6 +107,6 @@ describe('InstanceSelection', () => {

await userEvent.click(button);
expect(window.location.href).toBe('https://local.altinn.cloud/ttd/test#/instance/some-other-id');
expect(mutations.doInstantiate.mock).toBeCalledTimes(0);
expect(mutations.doInstantiate.mock).toHaveBeenCalledTimes(0);
});
});
4 changes: 2 additions & 2 deletions src/features/instantiate/selection/InstanceSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function InstanceSelection() {
</Table.Body>
{instances.length > rowsPerPageOptions[0] && (
<tfoot>
<Table.Row className={classes.tableFooter}>
<Table.Row>
<Table.Cell colSpan={2}>
<div className={classes.paginationWrapperMobile}>
<Pagination
Expand Down Expand Up @@ -215,7 +215,7 @@ function InstanceSelection() {
</Table.Body>
{instances.length > rowsPerPageOptions[0] && (
<tfoot>
<Table.Row className={classes.tableFooter}>
<Table.Row>
<Table.Cell colSpan={3}>
<div className={classes.paginationWrapper}>
<Pagination
Expand Down
5 changes: 1 addition & 4 deletions src/layout/Checkboxes/CheckboxesContainerComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ export const CheckboxContainerComponent = ({ node, overrideDisplay }: ICheckboxC
id={id}
key={`checkboxes_group_${id}`}
>
<Fieldset
className={classes.checkboxGroup}
aria-label={ariaLabel}
>
<Fieldset aria-label={ariaLabel}>
{overrideDisplay?.renderLegend !== false && (
<Fieldset.Legend className={classes.legend}>{labelTextGroup}</Fieldset.Legend>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/layout/RepeatingGroup/Table/RepeatingGroupTable.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ describe('RepeatingGroupTable', () => {
await screen.findByText('test row 1');
await userEvent.click(screen.getAllByRole('button', { name: /slett/i })[0]);

expect(formDataMethods.removeFromListCallback).toBeCalledTimes(1);
expect(formDataMethods.removeFromListCallback).toBeCalledWith({
expect(formDataMethods.removeFromListCallback).toHaveBeenCalledTimes(1);
expect(formDataMethods.removeFromListCallback).toHaveBeenCalledWith({
reference: { field: 'some-group', dataType: defaultDataTypeMock },
startAtIndex: 0,
callback: expect.any(Function),
Expand Down
Loading