@bigbinary/neeto-playwright-commons 1.22.45 → 1.22.47
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 +22 -16
- package/index.cjs.js.map +1 -1
- package/index.js +22 -16
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -191437,7 +191437,7 @@ class IntegrationBase {
|
|
|
191437
191437
|
locator: this.page.getByTestId(INTEGRATION_SELECTORS.connectButton),
|
|
191438
191438
|
timeout: 15000,
|
|
191439
191439
|
});
|
|
191440
|
-
await this.page.waitForLoadState("
|
|
191440
|
+
await this.page.waitForLoadState("domcontentloaded", { timeout: 35000 });
|
|
191441
191441
|
};
|
|
191442
191442
|
this.verifyIntegrationStatus = async (status = "connected", visibilityTimeout = 15000) => {
|
|
191443
191443
|
await this.gotoIntegrationIndex();
|
|
@@ -191461,6 +191461,7 @@ class IntegrationBase {
|
|
|
191461
191461
|
this.gotoIntegrationIndex = async () => {
|
|
191462
191462
|
if (neetoCist.isNotEmpty(this.integrationRouteIndex)) {
|
|
191463
191463
|
await this.page.goto(this.integrationRouteIndex, { timeout: 20000 });
|
|
191464
|
+
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.floatingActionMenuButton)).toBeVisible({ timeout: 25000 });
|
|
191464
191465
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
191465
191466
|
}
|
|
191466
191467
|
};
|
|
@@ -191665,26 +191666,24 @@ class SlackPage extends IntegrationBase {
|
|
|
191665
191666
|
const loginButton = this.page.getByRole("button", {
|
|
191666
191667
|
name: this.t("neetoSlack.slack.connect.loginButton"),
|
|
191667
191668
|
});
|
|
191669
|
+
const installButton = this.page.locator(SLACK_SELECTORS.installButton);
|
|
191668
191670
|
const allowButton = this.page.getByRole("button", {
|
|
191669
191671
|
name: SLACK_WEB_TEXTS.allow,
|
|
191670
191672
|
});
|
|
191671
|
-
const
|
|
191673
|
+
const button = installButton.or(allowButton);
|
|
191672
191674
|
if (await loginButton.isVisible()) {
|
|
191673
191675
|
await loginButton.click({ delay: 5000 });
|
|
191674
191676
|
await this.page.waitForURL(RegExp("(.*)slack.com/.*"));
|
|
191675
191677
|
}
|
|
191676
191678
|
await this.page.waitForLoadState("domcontentloaded", { timeout: 25000 });
|
|
191677
|
-
await test$1.expect(
|
|
191678
|
-
|
|
191679
|
-
});
|
|
191679
|
+
await test$1.expect(button).toBeVisible({ timeout: 25000 });
|
|
191680
|
+
await test$1.expect(button).toBeEnabled({ timeout: 25000 });
|
|
191680
191681
|
const currentWorkspace = (await this.page
|
|
191681
191682
|
.locator(SLACK_SELECTORS.teamPicketButtonContent)
|
|
191682
191683
|
.textContent()) || "";
|
|
191683
|
-
await
|
|
191684
|
+
await button.click({ timeout: 25000 });
|
|
191684
191685
|
await this.page.waitForURL(redirectUrl);
|
|
191685
|
-
await this.neetoPlaywrightUtilities.waitForPageLoad(
|
|
191686
|
-
visibilityTimeout: 10000,
|
|
191687
|
-
});
|
|
191686
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
191688
191687
|
await test$1.expect(this.page.getByRole("heading", {
|
|
191689
191688
|
name: this.t("neetoSlack.slack.configure.title", {
|
|
191690
191689
|
teamName: currentWorkspace,
|
|
@@ -191901,8 +191900,12 @@ class WebhooksPage {
|
|
|
191901
191900
|
}
|
|
191902
191901
|
|
|
191903
191902
|
const simulateTypingWithDelay = async ({ field, value, delay = 500, }) => {
|
|
191904
|
-
const
|
|
191905
|
-
const
|
|
191903
|
+
const minSliceLength = Math.max(3, Math.floor(value.length * 0.6));
|
|
191904
|
+
const maxSliceLength = Math.max(4, Math.floor(value.length * 0.8));
|
|
191905
|
+
const sliceLength = Math.floor(Math.random() * (maxSliceLength - minSliceLength + 1)) +
|
|
191906
|
+
minSliceLength;
|
|
191907
|
+
const maxBackspaceCount = Math.max(2, Math.min(4, Math.floor(sliceLength * 0.3)));
|
|
191908
|
+
const backspaceCount = Math.floor(Math.random() * (maxBackspaceCount - 1)) + 2;
|
|
191906
191909
|
const textPart1 = value.slice(0, sliceLength);
|
|
191907
191910
|
const textPart2 = value.slice(sliceLength - backspaceCount);
|
|
191908
191911
|
await field.hover();
|
|
@@ -193297,8 +193300,10 @@ class OrganizationPage {
|
|
|
193297
193300
|
await this.page.getByTestId(COMMON_SELECTORS.checkbox).click();
|
|
193298
193301
|
const profileSubmitButton = this.page.getByTestId(SIGNUP_SELECTORS.profileSubmitButton);
|
|
193299
193302
|
await profileSubmitButton.click();
|
|
193300
|
-
await test$1.expect(profileSubmitButton).toBeHidden({ timeout: 60000 });
|
|
193301
|
-
await this.neetoPlaywrightUtilities.waitForPageLoad(
|
|
193303
|
+
await test$1.expect(profileSubmitButton).toBeHidden({ timeout: 2 * 60000 });
|
|
193304
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad({
|
|
193305
|
+
visibilityTimeout: 45000,
|
|
193306
|
+
});
|
|
193302
193307
|
};
|
|
193303
193308
|
this.loginAndOnboard = async ({ email, firstName, lastName, country, handleOnboarding, baseURL = process.env.BASE_URL, fetchOtpFromEmail, }) => {
|
|
193304
193309
|
await this.page.goto(`${baseURL}${ROUTES.admin}`, { timeout: 20000 });
|
|
@@ -193732,10 +193737,11 @@ class RolesPage {
|
|
|
193732
193737
|
if (neetoCist.isNotEqualDeep(roleAccessableLinks, adminAccessableLinks)) {
|
|
193733
193738
|
for (const link of adminAccessableLinks) {
|
|
193734
193739
|
await this.page.goto(link);
|
|
193740
|
+
await test$1.expect
|
|
193741
|
+
.soft(this.page.getByTestId(COMMON_SELECTORS.floatingActionMenuButton))
|
|
193742
|
+
.toBeVisible({ timeout: 15000 });
|
|
193735
193743
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
193736
|
-
await test$1.expect(this.page.locator(COMMON_SELECTORS.tableSpinner)).toBeHidden({
|
|
193737
|
-
timeout: 15000,
|
|
193738
|
-
});
|
|
193744
|
+
await test$1.expect(this.page.locator(COMMON_SELECTORS.tableSpinner)).toBeHidden({ timeout: 35000 });
|
|
193739
193745
|
const unauthorizedHeading = this.page.getByRole("heading", {
|
|
193740
193746
|
name: this.t("neetoMolecules.errorPage.unauthorized"),
|
|
193741
193747
|
});
|