chore: Don't render certain components when running meticulous tests (#10772)
* chore: Don't render credits when running meticulous tests * fix: type window Meticulous * fix: window reference error * chore: window interface * chore: disable tzdialog popup on meticulous * chore: IS_VISUAL_REGRESSION_TESTING * fix: constants * fix: only run on preview builds --------- Co-authored-by: Shivam Kalra <[email protected]>
This commit is contained in:
1 parent
e3c747a867
commit
43b3d68447
6 files changed
+44
-33
No files matched your search
@@ -5,6 +5,7 @@ import dayjs from "@calcom/dayjs";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import { Dialog, DialogClose, DialogContent, DialogFooter, showToast } from "@calcom/ui";
|
||||
import { IS_VISUAL_REGRESSION_TESTING } from "@calcom/web/constants";
|
||||
|
||||
export default function TimezoneChangeDialog() {
|
||||
const { t } = useLocale();
|
||||
@@ -43,7 +44,7 @@ export default function TimezoneChangeDialog() {
|
||||
const tzDifferent =
|
||||
!isLoading && dayjs.tz(undefined, currentTz).utcOffset() !== dayjs.tz(undefined, userTz).utcOffset();
|
||||
const showDialog = tzDifferent && !document.cookie.includes("calcom-timezone-dialog=1");
|
||||
setOpen(showDialog);
|
||||
setOpen(!IS_VISUAL_REGRESSION_TESTING && showDialog);
|
||||
}, [currentTz, isLoading, userTz]);
|
||||
|
||||
// save cookie to not show again
|
||||
|
||||
@@ -77,6 +77,7 @@ import {
|
||||
Zap,
|
||||
} from "@calcom/ui/components/icon";
|
||||
import { Discord } from "@calcom/ui/components/icon/Discord";
|
||||
import { IS_VISUAL_REGRESSION_TESTING } from "@calcom/web/constants";
|
||||
|
||||
import { useOrgBranding } from "../ee/organizations/context/provider";
|
||||
import FreshChatProvider from "../ee/support/lib/freshchat/FreshChatProvider";
|
||||
@@ -920,7 +921,7 @@ function SideBar({ bannersHeight, user }: SideBarProps) {
|
||||
</ButtonOrLink>
|
||||
</Tooltip>
|
||||
))}
|
||||
<Credits />
|
||||
{!IS_VISUAL_REGRESSION_TESTING && <Credits />}
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user