
* 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
21 lines
640 B
TypeScript
21 lines
640 B
TypeScript
import { Page, expect } from "@playwright/test";
|
|
import { routing } from "../../setup/routing";
|
|
|
|
interface InstallTheAppArgs {
|
|
page: Page;
|
|
appName: string;
|
|
}
|
|
|
|
export const openTheApp = async ({ page, appName }: InstallTheAppArgs) => {
|
|
// got to Apps page, assuming user is logged in
|
|
await page.goto(routing.saleor.dashboard.apps, {
|
|
waitUntil: "load",
|
|
});
|
|
|
|
console.log("Navigated to", page.url());
|
|
|
|
// todo it must be test-id because we also have same name in appstore list
|
|
await page.getByText(appName).first().click();
|
|
|
|
await expect(page.url()).toMatch(new RegExp("https:\\/\\/.*\\/dashboard\\/apps\\/.*\\/app"));
|
|
};
|