fleet/frontend/test/default-handlers.ts
Gabriel Hernandez 50af9e800e
disabled manual agent install checkbox when setup experience software and run script is already added (#28679)
For [#28629](https://github.com/fleetdm/fleet/issues/28629)

this disabled the manual agent install checkbox if the user has already
uploaded install software or a run script for setup experience


- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality
2025-04-30 16:22:24 +01:00

29 lines
1 KiB
TypeScript

import { defaultActivityHandler } from "./handlers/activity-handlers";
import {
defaultDeviceHandler,
defaultDeviceMappingHandler,
defaultMacAdminsHandler,
} from "./handlers/device-handler";
export const baseUrl = (path: string) => {
return `/api/latest/fleet${path}`;
};
// These are the default handlers that are used when testing the frontend. They
// are used to mock the responses from the Fleet API when running tests.
// These can be overridden in individual tests using the .use() method on the
// mock server within the desired test.
// More info on .use() here: https://mswjs.io/docs/api/setup-worker/use/
// NOTE: adding default handlers here is an anti-pattern we are moving away from.
// It is an anti-pattern because it makes it difficult to understand what
// handlers are being used in a test. The preferred way is to use the mockServer.use()
// method in the test file itself.
const handlers = [
defaultDeviceHandler,
defaultDeviceMappingHandler,
defaultMacAdminsHandler,
defaultActivityHandler,
];
export default handlers;