Skip to content

Commit

Permalink
feat(container): adjusted mocks for agreements modal tests
Browse files Browse the repository at this point in the history
ref: MANAGER-14722

Signed-off-by: Jacques Larique <[email protected]>
  • Loading branch information
Jacques Larique committed Jan 9, 2025
1 parent 49000d3 commit b2d6293
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const shellContext = {
case 'environment': return {
getEnvironment: () => ({
getRegion: vi.fn(() => mocks.region),
getApplicationURL: vi.fn((app) => `https://ovh.com/manager/${app}`)
})
};
}
Expand Down Expand Up @@ -61,11 +62,11 @@ vi.mock('react', async (importOriginal) => {
});

vi.mock('@/hooks/accountUrn/useAccountUrn', () => ({
default: () => () => 'urn'
default: () => ({ data: 'urn' }),
}));

vi.mock('@ovh-ux/manager-react-components/src/hooks/iam', () => ({
useAuthorizationIam: () => () => ({ isAuthorized: mocks.isAuthorized })
vi.mock('@ovh-ux/manager-react-components', () => ({
useAuthorizationIam: () => ({ isAuthorized: mocks.isAuthorized })
}));

vi.mock('@/context/modals', () => ({
Expand Down

0 comments on commit b2d6293

Please sign in to comment.