feat: e2e tests for Connect atoms (#23433)

* e2e tests for apple connect atom

* update globalEnv for turbo.json

* update pages for tests

* update playwright config so we can use env variables inside tests

* update packages

* update variable names

* update playwright config

* fix: import variables from env instead of separate files

* update env variables for atoms e2e yml
This commit is contained in:
Rajiv Sahal authored and GitHub committed 2025-09-17 11:20:38 +02:00
1 parent f9095d298d
commit eaa1ad6578
6 files changed
+78 -2

No files matched your search

@@ -9,7 +9,7 @@ export default function Calendars(props: { calUsername: string; calEmail: string
return (
<main className={`flex min-h-screen flex-col ${inter.className}`}>
<Navbar username={props.calUsername} />
<div>
<div data-testid="calendars-settings-atom">
<CalendarSettings
allowDelete={true}
classNames={{
@@ -1,5 +1,7 @@
import { Navbar } from "@/components/Navbar";
import { Inter, Poppins } from "next/font/google";
// eslint-disable-next-line @calcom/eslint/deprecated-imports-next-router
import { useRouter } from "next/router";
import { Connect, StripeConnect } from "@calcom/atoms";
@@ -7,6 +9,8 @@ const inter = Inter({ subsets: ["latin"] });
const poppins = Poppins({ subsets: ["latin"], weight: ["400", "800"] });
export default function Home(props: { calUsername: string; calEmail: string }) {
const router = useRouter();
return (
<main className={`flex min-h-screen flex-col ${inter.className} items-center justify-center`}>
<Navbar username={props.calUsername} />
@@ -19,7 +23,7 @@ export default function Home(props: { calUsername: string; calEmail: string }) {
<p className={`w-[70%] font-normal ${inter.className} pb-3 text-2xl`}>
To get started, connect your google calendar.
</p>
<div className="flex flex-row gap-4">
<div data-testid="connect-atoms" className="flex flex-row gap-4">
<Connect.GoogleCalendar
redir="http://localhost:4321/calendars"
className="h-[40px] bg-gradient-to-r from-[#8A2387] via-[#E94057] to-[#F27121] text-center text-base font-semibold text-transparent text-white hover:bg-orange-700"
@@ -30,6 +34,9 @@ export default function Home(props: { calUsername: string; calEmail: string }) {
className="h-[40px] bg-gradient-to-r from-[#8A2387] via-[#E94057] to-[#F27121] text-center text-base font-semibold text-transparent text-white hover:bg-orange-700"
/>
<Connect.AppleCalendar
onSuccess={() => {
router.push(`/calendars`);
}}
isMultiCalendar={true}
className="h-[40px] bg-gradient-to-r from-[#8A2387] via-[#E94057] to-[#F27121] text-center text-base font-semibold text-transparent text-white hover:bg-orange-700"
/>