Skip to content

Commit

Permalink
[UICAL-281] Fix failing tests (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncovercash authored Mar 20, 2024
1 parent d2e315c commit 7ebc760
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/fields/ExceptionFieldUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function getDateField(
usePortal
value={innerRow[key]}
inputRef={(el) => {
fieldRefs[key][row.i][innerRow.i] = el;
fieldRefs[key][row.i][innerRow.i] = el as HTMLInputElement;
}}
error={getInnerRowError(isDirty, error, row.i, innerRow.i, 'startDate')}
onBlur={() => input.onBlur()}
Expand Down
1 change: 1 addition & 0 deletions src/test/__mocks__/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './stripes-components.mock';
import './stripes-config.mock';
import './stripes-core.mock';
import './stripes-smart-components.mock';
5 changes: 3 additions & 2 deletions src/test/__mocks__/stripes-core.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jest.mock('@folio/stripes/core', () => {
};

return {
...jest.requireActual('@folio/stripes/core'),
CalloutContext: jest.fn(() => ({ sendCallout: jest.fn() })),
IfInterface: jest.fn(({ name, children }) => {
return name === 'interface' || name === 'service-points-users' ? children : null;
}),
Expand All @@ -20,7 +20,8 @@ jest.mock('@folio/stripes/core', () => {
}
}),
Pluggable: jest.fn(({ children }) => [children]),
TitleManager: jest.fn(({ children }) => children),
useOkapiKy: jest.fn(),
useStripes: () => STRIPES,
useStripes: jest.fn(() => STRIPES),
};
});
3 changes: 3 additions & 0 deletions src/test/__mocks__/stripes-smart-components.mock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
jest.mock('@folio/stripes/smart-components', () => ({
Settings: jest.fn(() => 'Settings'),
}));

0 comments on commit 7ebc760

Please sign in to comment.