test: Add flag mocks

This adds mocked 'image-builder.firstboot.enabled' where needed.
This commit is contained in:
regexowl 2024-08-01 15:48:09 +02:00 committed by Klara Simickova
parent 8dd042aa05
commit 8ee2bad55e
13 changed files with 46 additions and 15 deletions

View file

@ -43,7 +43,9 @@ vi.mock('@redhat-cloud-services/frontend-components/useChrome', () => ({
vi.mock('@unleash/proxy-client-react', () => ({
useUnleashContext: () => vi.fn(),
useFlag: vi.fn(() => false),
useFlag: vi.fn((flag) =>
flag === 'image-builder.firstboot.enabled' ? true : false
),
}));
const goToFileSystemConfigurationStep = async () => {