Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ozer550 committed Jan 30, 2025
1 parent c45d4ec commit e1a13d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ jest.mock('kolibri-common/composables/useFacilities');
function makeWrapper() {
const store = makeStore();
store.state.facilityId = '123';
const selectedFacility = {
id: 123,
name: 'test facility',
dataset: {
learner_can_login_with_no_password: false,
},
};
useFacilities.mockImplementation(() =>
useFacilitiesMock({
facilities: {
Expand All @@ -20,6 +27,8 @@ function makeWrapper() {
},
],
},
facilityId: '123',
selectedFacility: selectedFacility,
}),
);
return mount(SignInPage, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const MOCK_DEFAULTS = {
facilityConfig: {},
selectedFacility: {},
facilities: [],
facilityId: '',
userIsMultiFacilityAdmin: false,
getFacilities: jest.fn(),
getFacilityConfig: jest.fn(),
Expand Down

0 comments on commit e1a13d4

Please sign in to comment.