@bigbinary/neeto-playwright-commons 1.8.18 → 1.8.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 +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 {
|
|
@@ -10658,6 +10659,9 @@ class OrganizationPage {
|
|
|
10658
10659
|
});
|
|
10659
10660
|
await this.page.getByTestId(SIGNUP_SELECTORS.profileSubmitButton).click();
|
|
10660
10661
|
await submitProfile;
|
|
10662
|
+
await this.page.waitForURL(new RegExp(getGlobalUserState().domain), {
|
|
10663
|
+
waitUntil: "load",
|
|
10664
|
+
});
|
|
10661
10665
|
};
|
|
10662
10666
|
this.setupOrganization = async (product) => {
|
|
10663
10667
|
if (!IS_STAGING_ENV)
|
|
@@ -10958,6 +10962,9 @@ const assertColumnHeaderVisibility = async ({ page, columnName, shouldBeVisible,
|
|
|
10958
10962
|
const visibilityAssertion = shouldBeVisible ? "toBeVisible" : "toBeHidden";
|
|
10959
10963
|
await test.expect(page.getByRole("columnheader", { name: columnName }))[visibilityAssertion]();
|
|
10960
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
|
+
};
|
|
10961
10968
|
const toggleColumnCheckboxAndVerifyVisibility = async ({ page, tableColumns, shouldBeChecked, }) => {
|
|
10962
10969
|
await page.getByTestId(COMMON_SELECTORS.columnsDropdownButton).click();
|
|
10963
10970
|
for (const columnName of tableColumns) {
|
|
@@ -10984,10 +10991,22 @@ const toggleColumnCheckboxAndVerifyVisibility = async ({ page, tableColumns, sho
|
|
|
10984
10991
|
}
|
|
10985
10992
|
};
|
|
10986
10993
|
const tableUtils = {
|
|
10994
|
+
verifyTableColumnsExistence,
|
|
10987
10995
|
assertColumnHeaderVisibility,
|
|
10988
10996
|
toggleColumnCheckboxAndVerifyVisibility,
|
|
10989
10997
|
};
|
|
10990
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
|
+
|
|
10991
11010
|
var main$2 = {exports: {}};
|
|
10992
11011
|
|
|
10993
11012
|
var name = "dotenv";
|
|
@@ -11572,6 +11591,7 @@ exports.definePlaywrightConfig = definePlaywrightConfig;
|
|
|
11572
11591
|
exports.extractSubdomainFromError = extractSubdomainFromError;
|
|
11573
11592
|
exports.generateStagingData = generateStagingData;
|
|
11574
11593
|
exports.getGlobalUserState = getGlobalUserState;
|
|
11594
|
+
exports.headerUtils = headerUtils;
|
|
11575
11595
|
exports.hyphenize = hyphenize;
|
|
11576
11596
|
exports.i18nFixture = i18nFixture;
|
|
11577
11597
|
exports.initializeCredentials = initializeCredentials;
|