V2 App Store test fixes

pull/4500/head
zomars 2022-09-15 12:52:52 +01:00
parent a9b41766f2
commit 8da31cb293
2 changed files with 8 additions and 9 deletions

View File

@ -8,8 +8,7 @@ test.describe("App Store - Authed", () => {
test("Browse apple-calendar and try to install", async ({ page, users }) => {
const pro = await users.create();
await pro.login();
await page.goto("/apps");
await page.click('[data-testid="app-store-category-calendar"]');
await page.goto("/apps/categories/calendar");
await page.click('[data-testid="app-store-app-card-apple-calendar"]');
await page.click('[data-testid="install-app-button"]');
await expect(page.locator(`text=Connect to Apple Server`)).toBeVisible();
@ -19,9 +18,7 @@ test.describe("App Store - Authed", () => {
test.describe("App Store - Unauthed", () => {
test("Browse apple-calendar and try to install", async ({ page }) => {
await page.goto("/apps");
await page.waitForSelector("[data-testid=dashboard-shell]");
await page.click('[data-testid="app-store-category-calendar"]');
await page.goto("/apps/categories/calendar");
await page.click('[data-testid="app-store-app-card-apple-calendar"]');
await page.click('[data-testid="install-app-button"]');
await expect(page.locator(`[data-testid="login-form"]`)).toBeVisible();

View File

@ -30,9 +30,7 @@ export default function AppCard({ app, credentials }: AppCardProps) {
const appAdded = (credentials && credentials.length) || 0;
return (
<div
className="relative flex h-64 flex-col rounded-md border border-gray-300 p-5"
data-testid={`app-store-app-card-${app.slug}`}>
<div className="relative flex h-64 flex-col rounded-md border border-gray-300 p-5">
<div className="flex">
<img src={app.logo} alt={app.name + " Logo"} className="mb-4 h-12 w-12 rounded-sm" />
</div>
@ -54,7 +52,11 @@ export default function AppCard({ app, credentials }: AppCardProps) {
{app.description}
</p>
<div className="mt-5 flex max-w-full flex-row flex-wrap justify-between gap-2">
<Button color="secondary" className="flex w-32 flex-grow justify-center" href={"/apps/" + app.slug}>
<Button
color="secondary"
className="flex w-32 flex-grow justify-center"
href={`/apps/${app.slug}`}
data-testid={`app-store-app-card-${app.slug}`}>
{t("details")}
</Button>
{app.isGlobal || (credentials && credentials.length > 0 && allowedMultipleInstalls)