
* 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
22 lines
608 B
TypeScript
22 lines
608 B
TypeScript
import { Page } from "@playwright/test";
|
|
import { routing } from "../../setup/routing";
|
|
|
|
interface InstallTheAppArgs {
|
|
page: Page;
|
|
appManifest: string;
|
|
}
|
|
|
|
export const installTheApp = async ({ page, appManifest }: InstallTheAppArgs) => {
|
|
// got to Apps page, assuming user is logged in
|
|
await page.goto(routing.saleor.dashboard.appInstallPage(appManifest), {
|
|
timeout: 20000,
|
|
waitUntil: "load",
|
|
});
|
|
|
|
console.log("Navigated to", page.url());
|
|
|
|
await page.getByRole("button", { name: "Install App" }).click();
|
|
|
|
// wait for the toast
|
|
await page.getByText("App installed").isVisible();
|
|
};
|