
* 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
19 lines
661 B
TypeScript
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();
|
|
};
|