mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 16:39:01 +00:00
_Note - currently feature flagged. Build frontend with `ALLOW_CONDITIONAL_ACCESS=true NODE_ENV=development yarn run webpack --progress --watch` to enable this feature. Also, all of this functionality depends on the new `config.license.managed_cloud` being true, so you'll need to mock that data somehow. [This branch](https://github.com/fleetdm/fleet/tree/27043-fake-data) has the appropriate fake data for testing_ ## For #27043, #27864 ### Build front end for Fleet's integration with Microsoft Entra, allowing conditional preventtion of single sign-on for hosts failing any policies on a team #### Trigger the integration  #### Triggered, but configuration still not verified <img width="1348" alt="√ not-verified-return-to-prefilled-form" src="https://github.com/user-attachments/assets/44d0c21f-2554-40a8-9158-d1107cff2d09" /> #### Verified, short and long tenant ids:  #### Verified –> Deleted  #### Enable for policies of a team  #### Activities <img width="886" alt="√ activities" src="https://github.com/user-attachments/assets/d21e6185-c2f2-40b2-9c69-9b92fab58766" /> #### Unavailable for self-hosted Fleet instances:  #### Premium only  - [x] Changes file added for user-visible changes in `changes/` - [x] Added/updated automated tests - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [ ] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import type { Config } from "jest";
|
|
|
|
const esModules = [
|
|
"react-markdown",
|
|
"vfile",
|
|
"vfile-message",
|
|
"micromark.+",
|
|
"unist-.+",
|
|
"unified",
|
|
"bail",
|
|
"is-plain-obj",
|
|
"trough",
|
|
"remark-.+",
|
|
"mdast-util-.+",
|
|
"parse-entities",
|
|
"character-entities",
|
|
"property-information",
|
|
"comma-separated-tokens",
|
|
"hast-util-whitespace",
|
|
"remark-.+",
|
|
"space-separated-tokens",
|
|
"decode-named-character-reference",
|
|
"ccount",
|
|
"escape-string-regexp",
|
|
"markdown-table",
|
|
"trim-lines",
|
|
].join("|");
|
|
|
|
const config: Config = {
|
|
rootDir: "../../",
|
|
moduleDirectories: ["node_modules", "frontend"],
|
|
testEnvironment: "jest-fixed-jsdom",
|
|
moduleNameMapper: {
|
|
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
|
|
"<rootDir>/frontend/__mocks__/fileMock.js",
|
|
"\\.(css|scss|sass)$": "identity-obj-proxy",
|
|
},
|
|
testMatch: ["**/*tests.[jt]s?(x)"],
|
|
setupFilesAfterEnv: ["<rootDir>/frontend/test/test-setup.ts"],
|
|
clearMocks: true,
|
|
testEnvironmentOptions: {
|
|
url: "http://localhost:8080",
|
|
customExportConditions: [""],
|
|
},
|
|
transformIgnorePatterns: [`/node_modules/(?!(${esModules})/)`],
|
|
globals: {
|
|
TransformStream,
|
|
featureFlags: { allowConditionalAccess: "true" },
|
|
},
|
|
};
|
|
|
|
export default config;
|