-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ refactor(typings): use .d.ts file for typings
- Loading branch information
1 parent
426b984
commit ff4f847
Showing
55 changed files
with
65 additions
and
227 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
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,3 @@ export type IActionConfig = { | |
apiKey: string; | ||
domain: string; | ||
}; | ||
|
||
export const FOR_CODE_COV = 1; |
2 changes: 0 additions & 2 deletions
2
...ckend/integrations/libs/postmark/types.ts → ...end/integrations/libs/postmark/types.d.ts
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
export type IActionConfig = { | ||
serverToken: string; | ||
}; | ||
|
||
export const FOR_CODE_COV = 1; |
2 changes: 0 additions & 2 deletions
2
...ckend/integrations/libs/sendgrid/types.ts → ...end/integrations/libs/sendgrid/types.d.ts
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
export type IActionConfig = { | ||
apiKey: string; | ||
}; | ||
|
||
export const FOR_CODE_COV = 1; |
2 changes: 0 additions & 2 deletions
2
...end/integrations/libs/sendinblue/types.ts → ...d/integrations/libs/sendinblue/types.d.ts
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
export type IActionConfig = { | ||
apiKey: string; | ||
}; | ||
|
||
export const FOR_CODE_COV = 1; |
2 changes: 0 additions & 2 deletions
2
src/backend/integrations/libs/slack/types.ts → ...ackend/integrations/libs/slack/types.d.ts
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
export type IActionConfig = { | ||
token: string; | ||
}; | ||
|
||
export const FOR_CODE_COV = 1; |
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 |
---|---|---|
|
@@ -4,5 +4,3 @@ export type IActionConfig = { | |
authUser: string; | ||
authPassword: string; | ||
}; | ||
|
||
export const FOR_CODE_COV = 1; |
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 |
---|---|---|
|
@@ -2,5 +2,3 @@ export type IActionConfig = { | |
authToken: string; | ||
accountSid: string; | ||
}; | ||
|
||
export const FOR_CODE_COV = 1; |
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
export type { PortalConfigDomain } from "./main/types"; | ||
|
||
export const FOR_CODE_COV = 1; | ||
|
||
export { updateMetaData, createMetaData } from "./main"; |
2 changes: 0 additions & 2 deletions
2
...b/config-persistence/portal/main/types.ts → ...config-persistence/portal/main/types.d.ts
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 |
---|---|---|
@@ -1,3 +1 @@ | ||
export type PortalConfigDomain = ""; | ||
|
||
export const FOR_CODE_COV = 1; |
2 changes: 0 additions & 2 deletions
2
src/backend/lib/key-value/portal/index.ts → src/backend/lib/key-value/portal/index.d.ts
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 |
---|---|---|
@@ -1,3 +1 @@ | ||
export { type PortalKeyValueDomain } from "./main"; | ||
|
||
export const FOR_CODE_COV = 1; |
2 changes: 0 additions & 2 deletions
2
src/backend/lib/key-value/portal/main.ts → src/backend/lib/key-value/portal/main.d.ts
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 |
---|---|---|
@@ -1,3 +1 @@ | ||
export type PortalKeyValueDomain = ""; | ||
|
||
export const FOR_CODE_COV = 1; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,5 +22,3 @@ export type ValidationKeys = { | |
method?: RequestMethod[]; | ||
body?: unknown; | ||
}; | ||
|
||
export const FOR_CODE_COV = 1; |
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
42 changes: 42 additions & 0 deletions
42
src/frontend/design-system/components/IntermediateCheckBox/IntermediateCheckBox.spec.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,42 @@ | ||
import { render, screen } from "@testing-library/react"; | ||
import userEvent from "@testing-library/user-event"; | ||
import { IntermediateCheckBox } from "."; | ||
|
||
describe("IntermediateCheckBox", () => { | ||
it("should render checked state correctly", () => { | ||
render( | ||
<IntermediateCheckBox state="checked" onClick={jest.fn} label="Test " /> | ||
); | ||
|
||
expect(screen.getByRole("checkbox", { name: "Test" })).toBeChecked(); | ||
}); | ||
|
||
it("should render un-checked state correctly", () => { | ||
render( | ||
<IntermediateCheckBox state="unchecked" onClick={jest.fn} label="Test " /> | ||
); | ||
|
||
expect(screen.getByRole("checkbox", { name: "Test" })).not.toBeChecked(); | ||
}); | ||
|
||
it("should render partial state correctly", () => { | ||
render( | ||
<IntermediateCheckBox state="partial" onClick={jest.fn} label="Test " /> | ||
); | ||
|
||
expect( | ||
screen.getByRole("checkbox", { name: "Test" }) | ||
).toBePartiallyChecked(); | ||
}); | ||
|
||
it("should call onClick with the correct state when pressed", async () => { | ||
const onClick = jest.fn(); | ||
render( | ||
<IntermediateCheckBox state="partial" onClick={onClick} label="Test " /> | ||
); | ||
|
||
await userEvent.click(screen.getByRole("checkbox", { name: "Test" })); | ||
|
||
expect(onClick).toHaveBeenCalledWith("partial"); | ||
}); | ||
}); |
Oops, something went wrong.