cal.pub0.org/apps/web/playwright/app-store.e2e.ts

39 lines
1.3 KiB
TypeScript
Raw Normal View History

2022-05-11 04:28:48 +00:00
import { expect } from "@playwright/test";
import { test } from "./lib/fixtures";
import { installAppleCalendar } from "./lib/testUtils";
2022-05-11 17:12:58 +00:00
test.describe.configure({ mode: "parallel" });
2023-03-01 20:18:51 +00:00
test.afterEach(({ users }) => users.deleteAll());
test.describe("App Store - Authed", () => {
test("Browse apple-calendar and try to install", async ({ page, users }) => {
const pro = await users.create();
await pro.apiLogin();
await installAppleCalendar(page);
2022-05-11 04:28:48 +00:00
await expect(page.locator(`text=Connect to Apple Server`)).toBeVisible();
});
test("Installed Apps - Navigation", async ({ page, users }) => {
const user = await users.create();
await user.apiLogin();
await page.goto("/apps/installed");
await page.waitForSelector('[data-testid="connect-calendar-apps"]');
await page.click('[data-testid="vertical-tab-payment"]');
await page.waitForSelector('[data-testid="connect-payment-apps"]');
await page.click('[data-testid="vertical-tab-automation"]');
await page.waitForSelector('[data-testid="connect-automation-apps"]');
});
});
test.describe("App Store - Unauthed", () => {
test("Browse apple-calendar and try to install", async ({ page }) => {
await installAppleCalendar(page);
2022-05-11 04:28:48 +00:00
await expect(page.locator(`[data-testid="login-form"]`)).toBeVisible();
});
});