More test fixes
parent
a1f6738cf1
commit
82a52e065f
|
@ -1,50 +1,25 @@
|
||||||
|
import { expect } from "@playwright/test";
|
||||||
|
|
||||||
import { test } from "./lib/fixtures";
|
import { test } from "./lib/fixtures";
|
||||||
|
|
||||||
test.describe("App Store - Authed", () => {
|
test.describe("App Store - Authed", () => {
|
||||||
test.use({ storageState: "playwright/artifacts/proStorageState.json" });
|
test.use({ storageState: "playwright/artifacts/proStorageState.json" });
|
||||||
test("Browse apple-calendar and try to install", async ({ page }) => {
|
test("Browse apple-calendar and try to install", async ({ page }) => {
|
||||||
await page.goto("/apps");
|
await page.goto("/apps");
|
||||||
page.click('[data-testid="app-store-category-calendar"]');
|
await page.click('[data-testid="app-store-category-calendar"]');
|
||||||
await page.waitForNavigation({
|
await page.click('[data-testid="app-store-app-card-apple-calendar"]');
|
||||||
url: (url) => {
|
|
||||||
console.log(url, url.pathname);
|
|
||||||
return url.pathname.includes("apps/categories/calendar");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
page.click('[data-testid="app-store-app-card-apple-calendar"]');
|
|
||||||
await page.waitForNavigation({
|
|
||||||
url: (url) => {
|
|
||||||
return url.pathname.includes("apps/apple-calendar");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
await page.click('[data-testid="install-app-button"]');
|
await page.click('[data-testid="install-app-button"]');
|
||||||
|
await expect(page.locator(`text=Connect to Apple Server`)).toBeVisible();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("App Store - Unauthed", () => {
|
test.describe("App Store - Unauthed", () => {
|
||||||
test("Browse apple-calendar and try to install", async ({ page }) => {
|
test("Browse apple-calendar and try to install", async ({ page }) => {
|
||||||
await page.goto("/apps");
|
await page.goto("/apps");
|
||||||
|
await page.waitForSelector("[data-testid=dashboard-shell]");
|
||||||
await page.click('[data-testid="app-store-category-calendar"]');
|
await page.click('[data-testid="app-store-category-calendar"]');
|
||||||
if (!page.url().includes("apps/categories/calendar")) {
|
|
||||||
await page.waitForNavigation({
|
|
||||||
url: (url) => {
|
|
||||||
console.log(url, url.pathname);
|
|
||||||
return url.pathname.includes("apps/categories/calendar");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
await page.click('[data-testid="app-store-app-card-apple-calendar"]');
|
await page.click('[data-testid="app-store-app-card-apple-calendar"]');
|
||||||
await page.waitForNavigation({
|
|
||||||
url: (url) => {
|
|
||||||
return url.pathname.includes("apps/apple-calendar");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
await page.click('[data-testid="install-app-button"]');
|
await page.click('[data-testid="install-app-button"]');
|
||||||
await page.waitForNavigation({
|
await expect(page.locator(`[data-testid="login-form"]`)).toBeVisible();
|
||||||
url: (url) => {
|
|
||||||
return url.pathname.includes("/auth/login");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue