@bigbinary/neeto-playwright-commons 1.22.5 → 1.22.7
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 +17 -15
- package/index.cjs.js.map +1 -1
- package/index.d.ts +4 -0
- package/index.js +17 -15
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4161,6 +4161,9 @@ declare const ROUTES: {
|
|
|
4161
4161
|
customDomain: string;
|
|
4162
4162
|
ipRestriction: string;
|
|
4163
4163
|
};
|
|
4164
|
+
auth: {
|
|
4165
|
+
adminPanel: string;
|
|
4166
|
+
};
|
|
4164
4167
|
};
|
|
4165
4168
|
/**
|
|
4166
4169
|
*
|
|
@@ -4492,6 +4495,7 @@ declare const GOOGLE_LOGIN_TEXTS: {
|
|
|
4492
4495
|
noLongerConnected: string;
|
|
4493
4496
|
backToSafety: string;
|
|
4494
4497
|
neetoAutomation: string;
|
|
4498
|
+
chooseAnAccount: string;
|
|
4495
4499
|
};
|
|
4496
4500
|
declare const ENGAGE_TEXTS: {
|
|
4497
4501
|
subscribe: string;
|
package/index.js
CHANGED
|
@@ -188854,6 +188854,9 @@ const ROUTES = {
|
|
|
188854
188854
|
customDomain: "/admin/admin-panel/general/custom-domain",
|
|
188855
188855
|
ipRestriction: "/admin/admin-panel/general/ip-restriction",
|
|
188856
188856
|
},
|
|
188857
|
+
auth: {
|
|
188858
|
+
adminPanel: "/admin/admin-panel",
|
|
188859
|
+
},
|
|
188857
188860
|
};
|
|
188858
188861
|
const API_ROUTES = {
|
|
188859
188862
|
teamMembers: {
|
|
@@ -188986,7 +188989,8 @@ const GOOGLE_LOGIN_TEXTS = {
|
|
|
188986
188989
|
deleteConnections: "Delete all connections you",
|
|
188987
188990
|
noLongerConnected: "You’re no longer connected to",
|
|
188988
188991
|
backToSafety: "Back to safety",
|
|
188989
|
-
neetoAutomation: "
|
|
188992
|
+
neetoAutomation: "automation",
|
|
188993
|
+
chooseAnAccount: "Choose an account",
|
|
188990
188994
|
};
|
|
188991
188995
|
const ENGAGE_TEXTS = { subscribe: "Subscribe" };
|
|
188992
188996
|
const COMMUNITY_TEXTS = { joinNow: "Join Now" };
|
|
@@ -189386,7 +189390,7 @@ class HelpAndProfilePage {
|
|
|
189386
189390
|
await this.page
|
|
189387
189391
|
.getByTestId(PROFILE_SECTION_SELECTORS.profileOrganizationSettingsButton)
|
|
189388
189392
|
.click();
|
|
189389
|
-
await expect(this.page).toHaveURL(new RegExp(ROUTES.
|
|
189393
|
+
await expect(this.page).toHaveURL(new RegExp(ROUTES.auth.adminPanel));
|
|
189390
189394
|
});
|
|
189391
189395
|
};
|
|
189392
189396
|
this.openAndVerifyStatus = async (appName) => {
|
|
@@ -191254,21 +191258,18 @@ class GooglePage extends IntegrationBase {
|
|
|
191254
191258
|
this.connectGoogleAccount = async (appName) => {
|
|
191255
191259
|
await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.chooseAccount));
|
|
191256
191260
|
await this.selectGoogleAccount(appName);
|
|
191257
|
-
if (process.env.TEST_ENV === ENVIRONMENT.staging) {
|
|
191258
|
-
await this.stagingConsentFlow();
|
|
191259
|
-
return;
|
|
191260
|
-
}
|
|
191261
191261
|
await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.consentScreen));
|
|
191262
191262
|
await this.page
|
|
191263
191263
|
.getByRole("button", { name: GOOGLE_LOGIN_TEXTS.allow })
|
|
191264
191264
|
.click();
|
|
191265
191265
|
};
|
|
191266
191266
|
this.selectGoogleAccount = async (appName) => {
|
|
191267
|
-
const
|
|
191268
|
-
|
|
191269
|
-
|
|
191270
|
-
|
|
191271
|
-
|
|
191267
|
+
const chooseAnAccountHeading = this.page.getByText(GOOGLE_LOGIN_TEXTS.chooseAnAccount, { exact: true });
|
|
191268
|
+
await expect(chooseAnAccountHeading).toBeVisible({ timeout: 10000 });
|
|
191269
|
+
await this.page
|
|
191270
|
+
.getByRole("link", { name: GOOGLE_LOGIN_TEXTS.neetoAutomation })
|
|
191271
|
+
.click();
|
|
191272
|
+
await expect(chooseAnAccountHeading).toBeHidden({ timeout: 10000 });
|
|
191272
191273
|
const verificationCode = this.page
|
|
191273
191274
|
.locator("form")
|
|
191274
191275
|
.getByText(GOOGLE_LOGIN_TEXTS.verificationCode);
|
|
@@ -191345,11 +191346,12 @@ class GooglePage extends IntegrationBase {
|
|
|
191345
191346
|
};
|
|
191346
191347
|
this.stagingConsentFlow = async ({ abortFlow = false, allowPermissions = true, } = {}) => {
|
|
191347
191348
|
await this.handleNotVerifiedPage();
|
|
191349
|
+
const continueBtn = this.page.getByRole("button", {
|
|
191350
|
+
name: GOOGLE_LOGIN_TEXTS.continue,
|
|
191351
|
+
});
|
|
191348
191352
|
this.page.url().includes(THIRD_PARTY_ROUTES.google.additionalInfoScreen) &&
|
|
191349
|
-
(await
|
|
191350
|
-
|
|
191351
|
-
.click({ timeout: 20000 }));
|
|
191352
|
-
await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.consentSummary));
|
|
191353
|
+
(await continueBtn.click({ timeout: 20000 }));
|
|
191354
|
+
await expect(continueBtn).toBeHidden({ timeout: 20000 });
|
|
191353
191355
|
if (abortFlow) {
|
|
191354
191356
|
await this.page
|
|
191355
191357
|
.getByRole("button", { name: GOOGLE_LOGIN_TEXTS.cancel })
|