@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.cjs.js
CHANGED
|
@@ -188874,6 +188874,9 @@ const ROUTES = {
|
|
|
188874
188874
|
customDomain: "/admin/admin-panel/general/custom-domain",
|
|
188875
188875
|
ipRestriction: "/admin/admin-panel/general/ip-restriction",
|
|
188876
188876
|
},
|
|
188877
|
+
auth: {
|
|
188878
|
+
adminPanel: "/admin/admin-panel",
|
|
188879
|
+
},
|
|
188877
188880
|
};
|
|
188878
188881
|
const API_ROUTES = {
|
|
188879
188882
|
teamMembers: {
|
|
@@ -189006,7 +189009,8 @@ const GOOGLE_LOGIN_TEXTS = {
|
|
|
189006
189009
|
deleteConnections: "Delete all connections you",
|
|
189007
189010
|
noLongerConnected: "You’re no longer connected to",
|
|
189008
189011
|
backToSafety: "Back to safety",
|
|
189009
|
-
neetoAutomation: "
|
|
189012
|
+
neetoAutomation: "automation",
|
|
189013
|
+
chooseAnAccount: "Choose an account",
|
|
189010
189014
|
};
|
|
189011
189015
|
const ENGAGE_TEXTS = { subscribe: "Subscribe" };
|
|
189012
189016
|
const COMMUNITY_TEXTS = { joinNow: "Join Now" };
|
|
@@ -189406,7 +189410,7 @@ class HelpAndProfilePage {
|
|
|
189406
189410
|
await this.page
|
|
189407
189411
|
.getByTestId(PROFILE_SECTION_SELECTORS.profileOrganizationSettingsButton)
|
|
189408
189412
|
.click();
|
|
189409
|
-
await test$1.expect(this.page).toHaveURL(new RegExp(ROUTES.
|
|
189413
|
+
await test$1.expect(this.page).toHaveURL(new RegExp(ROUTES.auth.adminPanel));
|
|
189410
189414
|
});
|
|
189411
189415
|
};
|
|
189412
189416
|
this.openAndVerifyStatus = async (appName) => {
|
|
@@ -191274,21 +191278,18 @@ class GooglePage extends IntegrationBase {
|
|
|
191274
191278
|
this.connectGoogleAccount = async (appName) => {
|
|
191275
191279
|
await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.chooseAccount));
|
|
191276
191280
|
await this.selectGoogleAccount(appName);
|
|
191277
|
-
if (process.env.TEST_ENV === ENVIRONMENT.staging) {
|
|
191278
|
-
await this.stagingConsentFlow();
|
|
191279
|
-
return;
|
|
191280
|
-
}
|
|
191281
191281
|
await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.consentScreen));
|
|
191282
191282
|
await this.page
|
|
191283
191283
|
.getByRole("button", { name: GOOGLE_LOGIN_TEXTS.allow })
|
|
191284
191284
|
.click();
|
|
191285
191285
|
};
|
|
191286
191286
|
this.selectGoogleAccount = async (appName) => {
|
|
191287
|
-
const
|
|
191288
|
-
|
|
191289
|
-
|
|
191290
|
-
|
|
191291
|
-
|
|
191287
|
+
const chooseAnAccountHeading = this.page.getByText(GOOGLE_LOGIN_TEXTS.chooseAnAccount, { exact: true });
|
|
191288
|
+
await test$1.expect(chooseAnAccountHeading).toBeVisible({ timeout: 10000 });
|
|
191289
|
+
await this.page
|
|
191290
|
+
.getByRole("link", { name: GOOGLE_LOGIN_TEXTS.neetoAutomation })
|
|
191291
|
+
.click();
|
|
191292
|
+
await test$1.expect(chooseAnAccountHeading).toBeHidden({ timeout: 10000 });
|
|
191292
191293
|
const verificationCode = this.page
|
|
191293
191294
|
.locator("form")
|
|
191294
191295
|
.getByText(GOOGLE_LOGIN_TEXTS.verificationCode);
|
|
@@ -191365,11 +191366,12 @@ class GooglePage extends IntegrationBase {
|
|
|
191365
191366
|
};
|
|
191366
191367
|
this.stagingConsentFlow = async ({ abortFlow = false, allowPermissions = true, } = {}) => {
|
|
191367
191368
|
await this.handleNotVerifiedPage();
|
|
191369
|
+
const continueBtn = this.page.getByRole("button", {
|
|
191370
|
+
name: GOOGLE_LOGIN_TEXTS.continue,
|
|
191371
|
+
});
|
|
191368
191372
|
this.page.url().includes(THIRD_PARTY_ROUTES.google.additionalInfoScreen) &&
|
|
191369
|
-
(await
|
|
191370
|
-
|
|
191371
|
-
.click({ timeout: 20000 }));
|
|
191372
|
-
await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.consentSummary));
|
|
191373
|
+
(await continueBtn.click({ timeout: 20000 }));
|
|
191374
|
+
await test$1.expect(continueBtn).toBeHidden({ timeout: 20000 });
|
|
191373
191375
|
if (abortFlow) {
|
|
191374
191376
|
await this.page
|
|
191375
191377
|
.getByRole("button", { name: GOOGLE_LOGIN_TEXTS.cancel })
|