@bigbinary/neeto-playwright-commons 1.26.19 → 1.26.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +9 -11
- package/index.cjs.js.map +1 -1
- package/index.d.ts +2 -2
- package/index.js +9 -11
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -5957,17 +5957,15 @@ class CustomCommands {
|
|
|
5957
5957
|
}).toPass({ timeout: 30000 });
|
|
5958
5958
|
};
|
|
5959
5959
|
this.verifyBreadcrumbs = async (titlesAndRoutes) => {
|
|
5960
|
-
const
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
: await test.expect(breadcrumb).toBeVisible();
|
|
5970
|
-
}));
|
|
5960
|
+
const header = this.page.getByTestId(COMMON_SELECTORS.breadcrumbHeader);
|
|
5961
|
+
const titles = ramda.pluck("title", titlesAndRoutes);
|
|
5962
|
+
const [last, ...links] = titlesAndRoutes.slice().reverse();
|
|
5963
|
+
await Promise.all([
|
|
5964
|
+
test.expect(header).toContainText(titles),
|
|
5965
|
+
test.expect(header).toHaveCount(titlesAndRoutes.length),
|
|
5966
|
+
test.expect(header.getByRole("link", { name: last === null || last === void 0 ? void 0 : last.title, exact: true })).toHaveCount(0),
|
|
5967
|
+
...links.map(({ title, route }) => test.expect(header.getByRole("link", { name: title, exact: true })).toHaveAttribute("href", route)),
|
|
5968
|
+
]);
|
|
5971
5969
|
};
|
|
5972
5970
|
this.uploadFileViaDispatchV2 = async ({ droppableZone = this.page.getByTestId(COMMON_SELECTORS.fileUploadBody), dispatchEvent = "drop", timeout = 45000, file, }) => {
|
|
5973
5971
|
const serializedFile = await serializeFileForBrowser(file);
|