@bigbinary/neeto-playwright-commons 1.8.19 → 1.8.21
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 +20 -0
- package/index.cjs.js.map +1 -1
- package/index.d.ts +18 -1
- package/index.js +20 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -191,6 +191,7 @@ const COMMON_SELECTORS = {
|
|
|
191
191
|
floatingActionMenuButton: "floating-action-menu-container",
|
|
192
192
|
columnsDropdownContainer: "columns-dropdown-container",
|
|
193
193
|
columnsDropdownButton: "columns-dropdown-button",
|
|
194
|
+
breadcrumbHeader: "header-breadcrumb",
|
|
194
195
|
};
|
|
195
196
|
|
|
196
197
|
class CustomCommands {
|
|
@@ -10961,6 +10962,9 @@ const assertColumnHeaderVisibility = async ({ page, columnName, shouldBeVisible,
|
|
|
10961
10962
|
const visibilityAssertion = shouldBeVisible ? "toBeVisible" : "toBeHidden";
|
|
10962
10963
|
await test.expect(page.getByRole("columnheader", { name: columnName }))[visibilityAssertion]();
|
|
10963
10964
|
};
|
|
10965
|
+
const verifyTableColumnsExistence = async ({ page, columnNames, }) => {
|
|
10966
|
+
await Promise.all(columnNames.map(columnName => test.expect(page.getByRole("columnheader", { name: columnName, exact: true })).toBeVisible()));
|
|
10967
|
+
};
|
|
10964
10968
|
const toggleColumnCheckboxAndVerifyVisibility = async ({ page, tableColumns, shouldBeChecked, }) => {
|
|
10965
10969
|
await page.getByTestId(COMMON_SELECTORS.columnsDropdownButton).click();
|
|
10966
10970
|
for (const columnName of tableColumns) {
|
|
@@ -10987,10 +10991,22 @@ const toggleColumnCheckboxAndVerifyVisibility = async ({ page, tableColumns, sho
|
|
|
10987
10991
|
}
|
|
10988
10992
|
};
|
|
10989
10993
|
const tableUtils = {
|
|
10994
|
+
verifyTableColumnsExistence,
|
|
10990
10995
|
assertColumnHeaderVisibility,
|
|
10991
10996
|
toggleColumnCheckboxAndVerifyVisibility,
|
|
10992
10997
|
};
|
|
10993
10998
|
|
|
10999
|
+
const verifyBreadcrumbs = async ({ page, titlesAndRoutes, }) => {
|
|
11000
|
+
await test.expect(page.getByTestId(COMMON_SELECTORS.breadcrumbHeader)).toHaveCount(titlesAndRoutes.length);
|
|
11001
|
+
await Promise.all(titlesAndRoutes.map(({ title, route }) => test.expect(page.getByTestId(COMMON_SELECTORS.breadcrumbHeader).getByRole("link", {
|
|
11002
|
+
name: title,
|
|
11003
|
+
exact: true,
|
|
11004
|
+
})).toHaveAttribute("href", route)));
|
|
11005
|
+
};
|
|
11006
|
+
const headerUtils = {
|
|
11007
|
+
verifyBreadcrumbs,
|
|
11008
|
+
};
|
|
11009
|
+
|
|
10994
11010
|
var main$2 = {exports: {}};
|
|
10995
11011
|
|
|
10996
11012
|
var name = "dotenv";
|
|
@@ -11506,6 +11522,9 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
11506
11522
|
video: { mode: "on", size: { width: 1200, height: 1200 } },
|
|
11507
11523
|
screenshot: "on",
|
|
11508
11524
|
actionTimeout: 10 * 1000,
|
|
11525
|
+
timezoneId: "Asia/Calcutta",
|
|
11526
|
+
geolocation: { latitude: 18.553187, longitude: 73.948313 }, // BB Pune office
|
|
11527
|
+
permissions: ["geolocation"],
|
|
11509
11528
|
...useOverrides,
|
|
11510
11529
|
},
|
|
11511
11530
|
projects: useCustomProjects
|
|
@@ -11575,6 +11594,7 @@ exports.definePlaywrightConfig = definePlaywrightConfig;
|
|
|
11575
11594
|
exports.extractSubdomainFromError = extractSubdomainFromError;
|
|
11576
11595
|
exports.generateStagingData = generateStagingData;
|
|
11577
11596
|
exports.getGlobalUserState = getGlobalUserState;
|
|
11597
|
+
exports.headerUtils = headerUtils;
|
|
11578
11598
|
exports.hyphenize = hyphenize;
|
|
11579
11599
|
exports.i18nFixture = i18nFixture;
|
|
11580
11600
|
exports.initializeCredentials = initializeCredentials;
|