test: add apple calendar testing (#10137)
Co-authored-by: Shivam Kalra <[email protected]> Co-authored-by: Omar López <[email protected]>
This commit is contained in:
13 files changed
+84
-9
No files matched your search
@@ -64,13 +64,17 @@ export default function AppleCalendarSetup() {
|
||||
router.push(json.url);
|
||||
}
|
||||
}}>
|
||||
<fieldset className="space-y-2" disabled={form.formState.isSubmitting}>
|
||||
<fieldset
|
||||
className="space-y-2"
|
||||
disabled={form.formState.isSubmitting}
|
||||
data-testid="apple-calendar-form">
|
||||
<TextField
|
||||
required
|
||||
type="text"
|
||||
{...form.register("username")}
|
||||
label="Apple ID"
|
||||
placeholder="[email protected]"
|
||||
data-testid="apple-calendar-email"
|
||||
/>
|
||||
<TextField
|
||||
required
|
||||
@@ -79,6 +83,7 @@ export default function AppleCalendarSetup() {
|
||||
label={t("password")}
|
||||
placeholder="•••••••••••••"
|
||||
autoComplete="password"
|
||||
data-testid="apple-calendar-password"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
@@ -87,7 +92,10 @@ export default function AppleCalendarSetup() {
|
||||
<Button type="button" color="secondary" onClick={() => router.back()}>
|
||||
{t("cancel")}
|
||||
</Button>
|
||||
<Button type="submit" loading={form.formState.isSubmitting}>
|
||||
<Button
|
||||
type="submit"
|
||||
loading={form.formState.isSubmitting}
|
||||
data-testid="apple-calendar-login-button">
|
||||
{t("save")}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -153,3 +153,10 @@ export async function rescheduleEvent(username: string, frame: Frame, page: Page
|
||||
await expect(frame.locator("[data-testid=success-page]")).toBeVisible();
|
||||
return booking;
|
||||
}
|
||||
|
||||
export async function installAppleCalendar(page: Page) {
|
||||
await page.goto("/apps/categories/calendar");
|
||||
await page.click('[data-testid="app-store-app-card-apple-calendar"]');
|
||||
await page.waitForURL("/apps/apple-calendar");
|
||||
await page.click('[data-testid="install-app-button"]');
|
||||
}
|
||||
Reference in new issue
Block a user