test: add test for invalid cal video (#13103)

* test: add test for invalid cal video

* chore: add confirm

* chore: fix type error

* chore: update code

* test: add unit test

* chore: type error

* chore

* chore: type

* chore: fix test

* chore

---------

Co-authored-by: Carina Wollendorfer <[email protected]>
This commit is contained in:
Udit TakkarandCarina Wollendorfer authored and GitHub committed 2024-01-15 15:07:58 -05:00
1 parent 13a765e50a
commit 7ec3d04acc
6 files changed
+112 -7

No files matched your search

@@ -21,6 +21,7 @@ export type ActionType = {
label: string;
disabled?: boolean;
color?: ButtonBaseProps["color"];
bookingId?: number;
} & (
| { href: string; onClick?: never; actions?: never }
| { href?: never; onClick: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void; actions?: never }
@@ -61,6 +62,7 @@ export const DropdownActions = ({
data-testid={action.id}
StartIcon={action.icon}
href={action.href}
data-bookingid={action.bookingId}
onClick={action.onClick || defaultAction}>
{action.label}
</DropdownItem>
@@ -87,6 +89,7 @@ export const TableActions: FC<Props> = ({ actions }) => {
StartIcon={action.icon}
{...(action?.actions ? { EndIcon: ChevronDown } : null)}
disabled={action.disabled}
data-bookingid={action.bookingId}
color={action.color || "secondary"}>
{action.label}
</Button>