Skip to content

Commit

Permalink
updated failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
shayanaijaz committed Jan 22, 2025
1 parent 6eb9144 commit 5517f65
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions react/src/components/Systems/SystemSelect.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,15 @@ import { render, screen, fireEvent } from '@testing-library/react';
import { SystemSelect } from './SystemSelect';
import systemsFixture from './Systems.fixture';

jest.mock('@hazmapper/hooks', () => {
return {
useSystems: () => {
return {
data: systemsFixture,
myDataSystem: { id: 'designsafe.storage.default' },
communityDataSystem: { id: 'designsafe.storage.community' },
publishedDataSystem: { id: 'designsafe.storage.published' },
};
},
useProjectsWithDesignSafeInformation: () => {
return {
data: [],
};
},
};
});
jest.mock('../../hooks', () => ({
useDsProjects: jest.fn(() => ({ result: [] })),
useSystems: jest.fn(() => ({
data: systemsFixture,
myDataSystem: { id: 'designsafe.storage.default' },
communityDataSystem: { id: 'designsafe.storage.community' },
publishedDataSystem: { id: 'designsafe.storage.published' },
})),
}));

describe('System Select', () => {
const mockOnSystemSelect = jest.fn();
Expand Down

0 comments on commit 5517f65

Please sign in to comment.