saleor-apps-redis_apl/packages/e2e/tests/assertions/assert-app-available.ts
Lukasz Ostrowski 7c98e384fd
E2E tests (#668)
* playwright install

* Configrations

* assertions

* basic tests for apps installations

* tests for product feed

* Adjust PF assertions to use test-id

* Taxes smoke test

* moved files around

* Add smoke for Klaviyo

* More taxes tests

* remove workflow

* add example

* extract separate test for pf

* Improve PF test

* cr fixes
2023-06-28 17:08:00 +02:00

19 lines
661 B
TypeScript

import { expect, Page } from "@playwright/test";
import { routing } from "../../setup/routing";
import { configuration } from "../../setup/configuration";
interface checkIfAppIsAvailableArgs {
page: Page;
appName: string;
}
export const assertAppAvailable = async ({ page, appName }: checkIfAppIsAvailableArgs) => {
await page.goto(routing.saleor.dashboard.apps, { timeout: 20000, waitUntil: "load" });
// todo need data-testid. this element is not unique
const appEntry = await page.getByText(appName).first();
await expect(appEntry).toBeVisible();
await expect(await page.getByText("Problem occured during installation.")).toBeHidden();
};