@bigbinary/neeto-playwright-commons 4.11.4 → 4.11.6
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.d.ts +6 -1
- package/index.js +31 -16
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2990,7 +2990,11 @@ declare class HelpAndProfilePage {
|
|
|
2990
2990
|
*
|
|
2991
2991
|
* Opens the workspace menu from Help Center and verifies the organization settings
|
|
2992
2992
|
*
|
|
2993
|
-
* link
|
|
2993
|
+
* link points to /auth/organization/edit. On staging it also opens the link and
|
|
2994
|
+
*
|
|
2995
|
+
* verifies it lands on the admin panel, since other environments have no
|
|
2996
|
+
*
|
|
2997
|
+
* NeetoAuth.
|
|
2994
2998
|
*
|
|
2995
2999
|
* @example
|
|
2996
3000
|
*
|
|
@@ -6806,6 +6810,7 @@ declare const ROUTES: {
|
|
|
6806
6810
|
auth: {
|
|
6807
6811
|
adminPanel: string;
|
|
6808
6812
|
billing: string;
|
|
6813
|
+
organizationSettings: string;
|
|
6809
6814
|
};
|
|
6810
6815
|
};
|
|
6811
6816
|
/**
|
package/index.js
CHANGED
|
@@ -69,6 +69,7 @@ const ROUTES = {
|
|
|
69
69
|
auth: {
|
|
70
70
|
adminPanel: "/admin/admin-panel",
|
|
71
71
|
billing: "/admin/my/profile/billing",
|
|
72
|
+
organizationSettings: "/auth/organization/edit",
|
|
72
73
|
},
|
|
73
74
|
};
|
|
74
75
|
const API_ROUTES = {
|
|
@@ -8077,7 +8078,7 @@ class HelpAndProfilePage {
|
|
|
8077
8078
|
await this.page
|
|
8078
8079
|
.getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
|
|
8079
8080
|
.click({ timeout: 60_000 });
|
|
8080
|
-
|
|
8081
|
+
IS_STAGING_ENV &&
|
|
8081
8082
|
(await expect(this.page).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL()), {
|
|
8082
8083
|
timeout: 60_000,
|
|
8083
8084
|
}));
|
|
@@ -8243,14 +8244,19 @@ class HelpAndProfilePage {
|
|
|
8243
8244
|
await this.page
|
|
8244
8245
|
.getByTestId(PROFILE_SECTION_SELECTORS.workspaceDisplay)
|
|
8245
8246
|
.click();
|
|
8247
|
+
const organizationSettingsButton = this.page.getByTestId(PROFILE_SECTION_SELECTORS.profileOrganizationSettingsButton);
|
|
8248
|
+
await expect(organizationSettingsButton).toHaveAttribute("href", ROUTES.auth.organizationSettings);
|
|
8249
|
+
if (!IS_STAGING_ENV)
|
|
8250
|
+
return;
|
|
8246
8251
|
const [workspacePage] = await Promise.all([
|
|
8247
8252
|
this.page.waitForEvent("popup"),
|
|
8248
|
-
|
|
8249
|
-
.getByTestId(PROFILE_SECTION_SELECTORS.profileOrganizationSettingsButton)
|
|
8250
|
-
.click(),
|
|
8253
|
+
organizationSettingsButton.click(),
|
|
8251
8254
|
]);
|
|
8252
|
-
await workspacePage.waitForLoadState();
|
|
8253
8255
|
await expect(workspacePage).toHaveURL(new RegExp(ROUTES.auth.adminPanel));
|
|
8256
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad({
|
|
8257
|
+
customPageContext: workspacePage,
|
|
8258
|
+
});
|
|
8259
|
+
await expect(workspacePage.getByTestId(COMMON_SELECTORS.heading)).toBeVisible();
|
|
8254
8260
|
await workspacePage.close();
|
|
8255
8261
|
});
|
|
8256
8262
|
};
|
|
@@ -11356,13 +11362,14 @@ class TagsPage {
|
|
|
11356
11362
|
.fill(faker.lorem.word(7));
|
|
11357
11363
|
await this.page.getByTestId(TAGS_SELECTORS.submitButton).click();
|
|
11358
11364
|
await this.neetoPlaywrightUtilities.verifyToast();
|
|
11359
|
-
await this.
|
|
11365
|
+
await this.neetoPlaywrightUtilities.waitForSheetClose();
|
|
11366
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
11360
11367
|
};
|
|
11361
11368
|
filterTagsViaUI = async (tagName) => {
|
|
11362
|
-
|
|
11363
|
-
|
|
11364
|
-
|
|
11365
|
-
await this.page
|
|
11369
|
+
const nameBlock = this.page.getByTestId(NEETO_FILTERS_SELECTORS.neetoFilterNameBlock);
|
|
11370
|
+
const rows = this.page.getByRole("row");
|
|
11371
|
+
const tagRow = this.page.getByRole("row", { name: tagName });
|
|
11372
|
+
await filterUtils.openFilterPaneV2(this.page);
|
|
11366
11373
|
await this.page
|
|
11367
11374
|
.getByTestId(NEETO_FILTERS_SELECTORS.neetoFiltersNameFilterField)
|
|
11368
11375
|
.fill(tagName);
|
|
@@ -11370,12 +11377,20 @@ class TagsPage {
|
|
|
11370
11377
|
await this.page
|
|
11371
11378
|
.getByTestId(NEETO_FILTERS_SELECTORS.filterDoneButton)
|
|
11372
11379
|
.click();
|
|
11373
|
-
await
|
|
11374
|
-
await
|
|
11375
|
-
|
|
11376
|
-
.getByTestId(NEETO_FILTERS_SELECTORS.neetoFiltersBarClearButton)
|
|
11377
|
-
.
|
|
11378
|
-
|
|
11380
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
11381
|
+
await Promise.all([
|
|
11382
|
+
expect(this.page.getByTestId(NEETO_FILTERS_SELECTORS.filterPaneHeading)).toBeHidden(),
|
|
11383
|
+
expect(this.page.getByTestId(NEETO_FILTERS_SELECTORS.neetoFiltersBarClearButton)).toBeVisible(),
|
|
11384
|
+
expect(nameBlock).toContainText(tagName),
|
|
11385
|
+
expect(tagRow).toBeVisible(),
|
|
11386
|
+
expect(rows).toHaveCount(2),
|
|
11387
|
+
]);
|
|
11388
|
+
await filterUtils.clearFiltersFromActionBlock(this.page);
|
|
11389
|
+
await Promise.all([
|
|
11390
|
+
expect(nameBlock).toBeHidden(),
|
|
11391
|
+
expect(tagRow).toBeVisible(),
|
|
11392
|
+
expect(rows).not.toHaveCount(2),
|
|
11393
|
+
]);
|
|
11379
11394
|
};
|
|
11380
11395
|
editTagViaUI = async ({ tagName, newTagName, }) => {
|
|
11381
11396
|
await this.page
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-playwright-commons",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.6",
|
|
4
4
|
"description": "A package encapsulating common playwright code across neeto projects.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-playwright-commons.git",
|
|
6
6
|
"license": "apache-2.0",
|