test: Remove mocking of chrome and unleash

This commit is contained in:
Anna Vítová 2024-09-09 17:36:57 +03:00 committed by Klara Simickova
parent 4b3efa5414
commit 87ba510680

View file

@ -11,30 +11,6 @@ import { emptyGetBlueprints } from '../../fixtures/blueprints';
import { server } from '../../mocks/server';
import { renderCustomRoutesWithReduxRouter } from '../../testUtils';
vi.mock('@redhat-cloud-services/frontend-components/useChrome', () => ({
useChrome: () => ({
isBeta: () => true,
isProd: () => true,
getEnvironment: () => 'prod',
}),
}));
vi.mock('@unleash/proxy-client-react', () => ({
useUnleashContext: () => vi.fn(),
useFlag: vi.fn((flag) => {
switch (flag) {
case 'image-builder.firstboot.enabled':
return true;
case 'image-builder.snapshots.enabled':
return true;
case 'image-builder.import.enabled':
return true;
default:
return false;
}
}),
}));
const selectBlueprintById = async (bpId: string) => {
const user = userEvent.setup();
const blueprint = await screen.findByTestId(bpId);