test: Add more orgs tests (#12241)
This commit is contained in:
1 parent
556b382f75
commit
48dde246e9
15 files changed
+397
-35
No files matched your search
@@ -11,24 +11,6 @@ const MembersView = () => {
|
||||
<LicenseRequired>
|
||||
<Meta title={t("organization_members")} description={t("organization_description")} />
|
||||
<div>
|
||||
{/* {team && (
|
||||
<>
|
||||
{isInviteOpen && (
|
||||
<TeamInviteList
|
||||
teams={[
|
||||
{
|
||||
id: team.id,
|
||||
accepted: team.membership.accepted || false,
|
||||
logo: team.logo,
|
||||
name: team.name,
|
||||
slug: team.slug,
|
||||
role: team.membership.role,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)} */}
|
||||
<UserListTable />
|
||||
</div>
|
||||
</LicenseRequired>
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
TextAreaField,
|
||||
} from "@calcom/ui";
|
||||
import { Link } from "@calcom/ui/components/icon";
|
||||
import type { Window as WindowWithClipboardValue } from "@calcom/web/playwright/fixtures/clipboard";
|
||||
|
||||
import type { PendingMember } from "../lib/types";
|
||||
import { GoogleWorkspaceInviteButton } from "./GoogleWorkspaceInviteButton";
|
||||
@@ -92,8 +93,15 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
|
||||
|
||||
const inviteLink =
|
||||
isOrgInvite || (props?.orgMembers && props.orgMembers?.length > 0) ? orgInviteLink : teamInviteLink;
|
||||
await navigator.clipboard.writeText(inviteLink);
|
||||
showToast(t("invite_link_copied"), "success");
|
||||
try {
|
||||
await navigator.clipboard.writeText(inviteLink);
|
||||
showToast(t("invite_link_copied"), "success");
|
||||
} catch (e) {
|
||||
if (process.env.NEXT_PUBLIC_IS_E2E) {
|
||||
(window as WindowWithClipboardValue).E2E_CLIPBOARD_VALUE = inviteLink;
|
||||
}
|
||||
console.error(e);
|
||||
}
|
||||
};
|
||||
|
||||
const options: MembershipRoleOption[] = useMemo(() => {
|
||||
|
||||
@@ -204,12 +204,15 @@ export function UserListTable() {
|
||||
id: "teams",
|
||||
header: "Teams",
|
||||
cell: ({ row }) => {
|
||||
const { teams, accepted } = row.original;
|
||||
const { teams, accepted, email } = row.original;
|
||||
// TODO: Implement click to filter
|
||||
return (
|
||||
<div className="flex h-full flex-wrap items-center gap-2">
|
||||
{accepted ? null : (
|
||||
<Badge variant="red" className="text-xs">
|
||||
<Badge
|
||||
variant="red"
|
||||
className="text-xs"
|
||||
data-testid={`email-${email.replace("@", "")}-pending`}>
|
||||
Pending
|
||||
</Badge>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user