fleet/frontend/__mocks__/commonMock.ts
jacobshandling da98679a3d
UI: Windows setup experience > install software (#32934)
## For #32541
_This cannot be end-to-end tested until associated
[server](https://github.com/fleetdm/fleet/issues/32542) and
[agent](https://github.com/fleetdm/fleet/issues/32544) work is complete_
- Include windows as a valid platform with all logic for setup
experience > software install

IT Admin flow:

![ezgif-26a18af23eb78b](https://github.com/user-attachments/assets/da294e8d-6992-41fa-b1f5-9e7b9500b8b7)

- [x] Changes file added for user-visible changes in `changes/`
- [ ] QA'd all new/changed functionality manually

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-09-16 10:12:25 -07:00

25 lines
817 B
TypeScript

import {
ListEntitiesResponseCommon,
ListEntitiesResponsePaginationCommon,
} from "services/entities/common";
const DEFAULT_PAGINATION_RESPONSE: ListEntitiesResponsePaginationCommon = {
has_next_results: false,
has_previous_results: false,
};
export const createMockPaginationResponse = (
overrides?: Partial<ListEntitiesResponsePaginationCommon>
): typeof DEFAULT_PAGINATION_RESPONSE => {
return { ...DEFAULT_PAGINATION_RESPONSE, ...overrides };
};
const DEFAULT_LIST_ENTITIES_RESPONSE_COMMON_MOCK: ListEntitiesResponseCommon = {
meta: createMockPaginationResponse(),
count: 1,
};
export const createMockListEntitiesResponseCommon = (
overrides?: Partial<ListEntitiesResponseCommon>
): ListEntitiesResponseCommon => {
return { ...DEFAULT_LIST_ENTITIES_RESPONSE_COMMON_MOCK, ...overrides };
};