fleet/frontend/__mocks__/licenseMock.ts
jacobshandling 7412e52783
UI: DUP only check for setup experience software on Fleet Premium (#33006)
## For #32967

- Only check for setup experience software to install if Fleet is a
Premium instance
- Test 3 states for Linux hosts (Free, Premium with setup software,
Premium without setup software)

### Free –> forwards directly to regular DUP:

![ezgif-65398dddc88294](https://github.com/user-attachments/assets/e92ee339-3bb8-40bc-a1e2-f18a80801f89)

### Premium –> checks for setup software, renders "Setting up your
device" page if present:

![ezgif-6dff84cf13facb](https://github.com/user-attachments/assets/03e8c994-e5e1-4fa7-9ad1-93c5e6171fe6)

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually
- [x] Confirmed that the fix is not expected to adversely impact load
test results

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-09-15 15:26:23 -07:00

17 lines
429 B
TypeScript

const DEFAULT_LICENSE_MOCK = {
tier: "premium",
device_count: 100,
expiration: "2050-01-01T00:00:00Z",
note: "test license",
organization: "test org",
managed_cloud: false,
allow_disable_telemetry: false,
};
type License = typeof DEFAULT_LICENSE_MOCK;
const createMockLicense = (overrides?: Partial<License>): License => {
return { ...DEFAULT_LICENSE_MOCK, ...overrides };
};
export default createMockLicense;