test: Move mocks to setup file
This moves all the mocks used throughout our test files into the test setup file.
This commit is contained in:
parent
79d54eed7b
commit
1554d78cba
25 changed files with 43 additions and 632 deletions
|
|
@ -44,30 +44,6 @@ const routes = [
|
|||
|
||||
let router: RemixRouter | undefined = undefined;
|
||||
|
||||
vi.mock('@redhat-cloud-services/frontend-components/useChrome', () => ({
|
||||
useChrome: () => ({
|
||||
auth: {
|
||||
getUser: () => {
|
||||
return {
|
||||
identity: {
|
||||
internal: {
|
||||
org_id: 5,
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
isBeta: () => true,
|
||||
isProd: () => true,
|
||||
getEnvironment: () => 'prod',
|
||||
}),
|
||||
}));
|
||||
|
||||
vi.mock('@unleash/proxy-client-react', () => ({
|
||||
useUnleashContext: () => vi.fn(),
|
||||
useFlag: vi.fn(() => false),
|
||||
}));
|
||||
|
||||
const switchToAWSManual = async () => {
|
||||
const user = userEvent.setup();
|
||||
const manualRadio = await screen.findByRole('radio', {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue