saleor-apps-redis_apl/packages/e2e/tests/apps/taxes/assertions/assert-app-render.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

21 lines
797 B
TypeScript

import { expect, FrameLocator } from "@playwright/test";
export const assertAppRender = async (iframeLocator: FrameLocator) => {
/*
* TODO Add test-ids assertions after added to app
* todo assert empty state, but these tests must ensure app has fresh install
*/
await expect(
iframeLocator.getByRole("heading", {
name: "Tax providers",
})
).toBeVisible();
await expect(iframeLocator.getByRole("heading", { name: "Available channels" })).toBeVisible();
// await expect(iframeLocator.getByRole("heading", { name: "Tax code matcher" })).toBeVisible(); // todo enable when app enables
const addProviderButton = await iframeLocator.getByRole("button", {
name: new RegExp(/Add new|Add first provider/),
});
await expect(addProviderButton).toBeVisible();
};