-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rename data-categories.slice --> taxonomy.slice * Add active taxonomy type to store * Add create mutation to slices * Hook up create to form * Fixup form UX * Derive parent key from fides key * Conditionally render parent key field * Add tests for adding taxonomy entities * Clean up * Update changelog * Simplify setting add state * Add test for showing either add or create form * Derive isCreate from status of fides key
- Loading branch information
1 parent
1d7b896
commit ba09cec
Showing
20 changed files
with
437 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
clients/ctl/admin-ui/__tests__/features/taxonomy-helpers.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { parentKeyFromFidesKey } from "~/features/taxonomy/helpers"; | ||
|
||
describe("taxonomy helpers", () => { | ||
describe("parent key from fides key", () => { | ||
it("should handle nested fides keys", () => { | ||
const fidesKey = "grandparent.parent.child"; | ||
expect(parentKeyFromFidesKey(fidesKey)).toEqual("grandparent.parent"); | ||
}); | ||
it("should handle empty fides key", () => { | ||
const fidesKey = ""; | ||
expect(parentKeyFromFidesKey(fidesKey)).toEqual(""); | ||
}); | ||
it("should handle single fides key", () => { | ||
const fidesKey = "root"; | ||
expect(parentKeyFromFidesKey(fidesKey)).toEqual(""); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.