@bigbinary/neeto-playwright-commons 1.18.0 → 1.18.2
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 +196 -269
- package/index.cjs.js.map +1 -1
- package/index.d.ts +75 -15
- package/index.js +193 -270
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -27,74 +27,6 @@ import require$$1$1 from 'string_decoder';
|
|
|
27
27
|
import require$$4$1 from 'timers';
|
|
28
28
|
import require$$3$2 from 'crypto';
|
|
29
29
|
|
|
30
|
-
const BASE_URL = "/api/v1";
|
|
31
|
-
const NEETO_AUTH_BASE_URL = (subdomain = "app") => `https://${subdomain}.neetoauth.net`;
|
|
32
|
-
const ROUTES = {
|
|
33
|
-
neetoAuthSignup: `${NEETO_AUTH_BASE_URL()}/signups/new`,
|
|
34
|
-
neetoAuth: NEETO_AUTH_BASE_URL(),
|
|
35
|
-
loginLink: "/login",
|
|
36
|
-
profile: "/profile",
|
|
37
|
-
admin: "/admin",
|
|
38
|
-
myProfile: "/my/profile",
|
|
39
|
-
authSettings: "/settings",
|
|
40
|
-
webhooks: "/webhooks",
|
|
41
|
-
login: `${BASE_URL}/login`,
|
|
42
|
-
signup: `${BASE_URL}/signups`,
|
|
43
|
-
subdomainAvailability: `${BASE_URL}/subdomain_availability`,
|
|
44
|
-
countries: `${BASE_URL}/countries`,
|
|
45
|
-
neetoApps: `${BASE_URL}/neeto_apps`,
|
|
46
|
-
directUploads: "/direct_uploads",
|
|
47
|
-
teamMembers: {
|
|
48
|
-
all: "/team_members*/**",
|
|
49
|
-
bulkUpdate: "/team_members/teams/bulk_update",
|
|
50
|
-
index: "/team_members/teams",
|
|
51
|
-
show: (id) => `/team_members/teams/${id}`,
|
|
52
|
-
},
|
|
53
|
-
attachment: `/neeto_editor${BASE_URL}/direct_uploads/attach`,
|
|
54
|
-
dashboard: "/dashboard",
|
|
55
|
-
neetoThankYou: "/neeto_thank_you_engine",
|
|
56
|
-
};
|
|
57
|
-
const API_ROUTES = {
|
|
58
|
-
teamMembers: {
|
|
59
|
-
all: "/team_members*/**",
|
|
60
|
-
bulkUpdate: "/team_members/teams/bulk_update",
|
|
61
|
-
index: "/team_members/teams",
|
|
62
|
-
show: (id) => `/team_members/teams/${id}`,
|
|
63
|
-
creationStatus: (id) => `/team_members/teams/creation_status/${id}`,
|
|
64
|
-
},
|
|
65
|
-
integrations: {
|
|
66
|
-
zapier: {
|
|
67
|
-
api_keys: "/neeto_integrations/zapier/api_keys",
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
const THIRD_PARTY_ROUTES = {
|
|
72
|
-
webhooks: { site: "https://webhook.site/" },
|
|
73
|
-
slack: {
|
|
74
|
-
loginWithPassword: (workspace) => `https://${workspace}.slack.com/sign_in_with_password`,
|
|
75
|
-
},
|
|
76
|
-
zapier: {
|
|
77
|
-
login: "https://zapier.com/",
|
|
78
|
-
logOut: "https://zapier.com/logout",
|
|
79
|
-
zapEditor: (zapId) => `https://zapier.com/editor/${zapId}`,
|
|
80
|
-
},
|
|
81
|
-
google: {
|
|
82
|
-
signin: "https://accounts.google.com/v3/signin/identifier?hl=en-gb&ifkv=ASKXGp0nW770RS7xin2puSwbGDpGCeaVKDtCgfpEU73fYmhMKbqUjukBQ5x8kdvEVxQ7OvcrnUo8sg&flowName=GlifWebSignIn&flowEntry=ServiceLogin&dsh=S688843923%3A1704795906762870&theme=glif",
|
|
83
|
-
password: "https://accounts.google.com/v3/signin/challenge/pwd",
|
|
84
|
-
totpChallenge: "https://accounts.google.com/v3/signin/challenge/totp",
|
|
85
|
-
challengeSelection: "https://accounts.google.com/v3/signin/challenge/selection",
|
|
86
|
-
myAccount: "https://myaccount.google.com/",
|
|
87
|
-
chooseAccount: "accounts.google.com/o/oauth2/auth/oauthchooseaccount",
|
|
88
|
-
consentScreen: "accounts.google.com/signin/oauth/consent",
|
|
89
|
-
warningScreen: "accounts.google.com/signin/oauth/warning",
|
|
90
|
-
additionalInfoScreen: "accounts.google.com/signin/oauth/id",
|
|
91
|
-
consentSummary: "accounts.google.com/signin/oauth/v2/consentsummary",
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
const NEETO_ROUTES = {
|
|
95
|
-
imageUploader: "/neeto_image_uploader_engine",
|
|
96
|
-
};
|
|
97
|
-
|
|
98
30
|
const ENVIRONMENT = {
|
|
99
31
|
development: "development",
|
|
100
32
|
staging: "staging",
|
|
@@ -672,6 +604,7 @@ const CHAT_WIDGET_SELECTORS = {
|
|
|
672
604
|
chatBubble: "neeto-chat-widget-chat-message-bubble",
|
|
673
605
|
closeChat: "neeto-chat-widget-close-btn",
|
|
674
606
|
chatQuestionHeader: "chat-question-header",
|
|
607
|
+
openChat: "neeto-chat-widget-open-btn",
|
|
675
608
|
};
|
|
676
609
|
const CHANGELOG_WIDGET_SELECTORS = {
|
|
677
610
|
changelogWrapper: ".ne-widget__wrapper",
|
|
@@ -784,6 +717,26 @@ const THEMES_SELECTORS = {
|
|
|
784
717
|
introPageThemeStyle: (styleType) => `intro-page-theme-style-${hyphenate(styleType)}`,
|
|
785
718
|
};
|
|
786
719
|
|
|
720
|
+
const ADMIN_PANEL_SELECTORS = {
|
|
721
|
+
settingsItemHeading: "settings-item-heading",
|
|
722
|
+
settingsItemDescription: "settings-item-description",
|
|
723
|
+
expiryDateInput: "expiry-date-input",
|
|
724
|
+
};
|
|
725
|
+
const CUSTOM_DOMAIN_SELECTORS = {
|
|
726
|
+
addCustomDomainButton: "add-new-custom-domain-button",
|
|
727
|
+
customDomainInputField: "custom-domain-input-field",
|
|
728
|
+
submitCustomDomainButton: "submit-custom-domain-button",
|
|
729
|
+
customDomainValidateButton: "validate-domain-button",
|
|
730
|
+
editCustomDomainButton: "edit-custom-domain-button",
|
|
731
|
+
deleteCustomDomainButton: "delete-custom-domain-button",
|
|
732
|
+
dropdownButton: "custom-domains-more-dropdown-button",
|
|
733
|
+
};
|
|
734
|
+
const API_KEYS_SELECTORS = {
|
|
735
|
+
editApiKeyButton: "api-key-edit-button",
|
|
736
|
+
deleteApiKeyButton: "api-key-delete-button",
|
|
737
|
+
addApiKeyButton: "add-api-key-button",
|
|
738
|
+
};
|
|
739
|
+
|
|
787
740
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
788
741
|
|
|
789
742
|
function getDefaultExportFromCjs (x) {
|
|
@@ -3923,34 +3876,30 @@ class CustomCommands {
|
|
|
3923
3876
|
};
|
|
3924
3877
|
this.verifyToast = async ({ message = "", toastType = "success", closeAfterVerification = true, timeout = 10000, customPageContext = this.page, } = {}) => {
|
|
3925
3878
|
const toastrCloseButton = customPageContext.getByTestId(COMMON_SELECTORS.toastCloseButton);
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
}
|
|
3932
|
-
if (closeAfterVerification && (await toastrCloseButton.
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3879
|
+
const toastrLocator = isEmpty$1(message)
|
|
3880
|
+
? customPageContext.locator(COMMON_SELECTORS.toastIcon)
|
|
3881
|
+
: customPageContext.getByTestId(COMMON_SELECTORS.toastMessage(toastType));
|
|
3882
|
+
await expect(toastrLocator).toContainText(isEmpty$1(message) ? "👍" : message, {
|
|
3883
|
+
timeout,
|
|
3884
|
+
});
|
|
3885
|
+
if (!closeAfterVerification && (await toastrCloseButton.isHidden()))
|
|
3886
|
+
return;
|
|
3887
|
+
const buttonHandle = await toastrCloseButton.elementHandle();
|
|
3888
|
+
if (buttonHandle) {
|
|
3889
|
+
await customPageContext.evaluate(button => {
|
|
3890
|
+
button.dispatchEvent(new Event("click", { bubbles: true }));
|
|
3891
|
+
}, buttonHandle);
|
|
3892
|
+
// eslint-disable-next-line playwright/no-standalone-expect
|
|
3893
|
+
await expect(toastrCloseButton).toBeHidden();
|
|
3941
3894
|
}
|
|
3942
3895
|
};
|
|
3943
|
-
this.reloadAndWait = async (
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
await
|
|
3950
|
-
await Promise.all([
|
|
3951
|
-
this.waitForPageLoad({ customPageContext: pageContext }),
|
|
3952
|
-
reloadRequests,
|
|
3953
|
-
]);
|
|
3896
|
+
this.reloadAndWait = async (
|
|
3897
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3898
|
+
requestCount, customPageContext = this.page,
|
|
3899
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3900
|
+
interceptMultipleResponsesProps = {}) => {
|
|
3901
|
+
await customPageContext.reload();
|
|
3902
|
+
await this.waitForPageLoad({ customPageContext });
|
|
3954
3903
|
};
|
|
3955
3904
|
this.waitForPageLoad = async ({ visibilityTimeout = 35000, customPageContext, } = {}) => {
|
|
3956
3905
|
const pageContext = customPageContext !== null && customPageContext !== void 0 ? customPageContext : this.page;
|
|
@@ -4029,13 +3978,9 @@ class CustomCommands {
|
|
|
4029
3978
|
await this.page
|
|
4030
3979
|
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.browseText)
|
|
4031
3980
|
.click();
|
|
4032
|
-
const uploadFile = this.interceptMultipleResponses({
|
|
4033
|
-
responseUrl: ROUTES.directUploads,
|
|
4034
|
-
});
|
|
4035
3981
|
await this.page
|
|
4036
3982
|
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.fileInput)
|
|
4037
3983
|
.setInputFiles(imagePath);
|
|
4038
|
-
await uploadFile;
|
|
4039
3984
|
await expect(this.page.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.uploadedImage)).toHaveAttribute("src", new RegExp(imageName), { timeout: 20000 });
|
|
4040
3985
|
};
|
|
4041
3986
|
this.uploadFileViaDispatch = async ({ fileNameWithType, assetsPath = "../../../e2e/assets/", dispatchEvent = "drop", droppableZone = this.page.getByTestId(COMMON_SELECTORS.fileUploadBody), }) => {
|
|
@@ -21278,26 +21223,6 @@ const i18nFixture = {
|
|
|
21278
21223
|
],
|
|
21279
21224
|
};
|
|
21280
21225
|
|
|
21281
|
-
const ADMIN_PANEL_SELECTORS = {
|
|
21282
|
-
settingsItemHeading: "settings-item-heading",
|
|
21283
|
-
settingsItemDescription: "settings-item-description",
|
|
21284
|
-
expiryDateInput: "expiry-date-input",
|
|
21285
|
-
};
|
|
21286
|
-
const CUSTOM_DOMAIN_SELECTORS = {
|
|
21287
|
-
addCustomDomainButton: "add-new-custom-domain-button",
|
|
21288
|
-
customDomainInputField: "custom-domain-input-field",
|
|
21289
|
-
submitCustomDomainButton: "submit-custom-domain-button",
|
|
21290
|
-
customDomainValidateButton: "validate-domain-button",
|
|
21291
|
-
moreDropdownButton: "custom-domains-more-dropdown-button",
|
|
21292
|
-
editCustomDomainButton: "edit-custom-domain-button",
|
|
21293
|
-
deleteCustomDomainButton: "delete-custom-domain-button",
|
|
21294
|
-
};
|
|
21295
|
-
const API_KEYS_SELECTORS = {
|
|
21296
|
-
editApiKeyButton: "api-key-edit-button",
|
|
21297
|
-
deleteApiKeyButton: "api-key-delete-button",
|
|
21298
|
-
addApiKeyButton: "add-api-key-button",
|
|
21299
|
-
};
|
|
21300
|
-
|
|
21301
21226
|
class AdminPanelPage {
|
|
21302
21227
|
constructor(page, neetoPlaywrightUtilities) {
|
|
21303
21228
|
this.verifyAdminPanelCard = ({ cardLocator, title, description, }) => Promise.all([
|
|
@@ -21315,11 +21240,8 @@ class ThankYouPage {
|
|
|
21315
21240
|
constructor(page, neetoPlaywrightUtilities) {
|
|
21316
21241
|
this.navigateToThankYouPage = async () => {
|
|
21317
21242
|
await this.page.getByTestId(TAB_SELECTORS.settingsTab).click();
|
|
21318
|
-
const fetchConfiguration = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
21319
|
-
responseUrl: ROUTES.neetoThankYou,
|
|
21320
|
-
});
|
|
21321
21243
|
await this.page.getByTestId(THANK_YOU_SELECTORS.settingsLink).click();
|
|
21322
|
-
await
|
|
21244
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
21323
21245
|
};
|
|
21324
21246
|
this.saveChanges = async () => {
|
|
21325
21247
|
await this.page.getByTestId(THANK_YOU_SELECTORS.saveChangesButton).click();
|
|
@@ -21551,6 +21473,74 @@ class EmbedBase {
|
|
|
21551
21473
|
}
|
|
21552
21474
|
}
|
|
21553
21475
|
|
|
21476
|
+
const BASE_URL = "/api/v1";
|
|
21477
|
+
const NEETO_AUTH_BASE_URL = (subdomain = "app") => `https://${subdomain}.neetoauth.net`;
|
|
21478
|
+
const ROUTES = {
|
|
21479
|
+
neetoAuthSignup: `${NEETO_AUTH_BASE_URL()}/signups/new`,
|
|
21480
|
+
neetoAuth: NEETO_AUTH_BASE_URL(),
|
|
21481
|
+
loginLink: "/login",
|
|
21482
|
+
profile: "/profile",
|
|
21483
|
+
admin: "/admin",
|
|
21484
|
+
myProfile: "/my/profile",
|
|
21485
|
+
authSettings: "/settings",
|
|
21486
|
+
webhooks: "/webhooks",
|
|
21487
|
+
login: `${BASE_URL}/login`,
|
|
21488
|
+
signup: `${BASE_URL}/signups`,
|
|
21489
|
+
subdomainAvailability: `${BASE_URL}/subdomain_availability`,
|
|
21490
|
+
countries: `${BASE_URL}/countries`,
|
|
21491
|
+
neetoApps: `${BASE_URL}/neeto_apps`,
|
|
21492
|
+
directUploads: "/direct_uploads",
|
|
21493
|
+
teamMembers: {
|
|
21494
|
+
all: "/team_members*/**",
|
|
21495
|
+
bulkUpdate: "/team_members/teams/bulk_update",
|
|
21496
|
+
index: "/team_members/teams",
|
|
21497
|
+
show: (id) => `/team_members/teams/${id}`,
|
|
21498
|
+
},
|
|
21499
|
+
attachment: `/neeto_editor${BASE_URL}/direct_uploads/attach`,
|
|
21500
|
+
dashboard: "/dashboard",
|
|
21501
|
+
neetoThankYou: "/neeto_thank_you_engine",
|
|
21502
|
+
};
|
|
21503
|
+
const API_ROUTES = {
|
|
21504
|
+
teamMembers: {
|
|
21505
|
+
all: "/team_members*/**",
|
|
21506
|
+
bulkUpdate: "/team_members/teams/bulk_update",
|
|
21507
|
+
index: "/team_members/teams",
|
|
21508
|
+
show: (id) => `/team_members/teams/${id}`,
|
|
21509
|
+
creationStatus: (id) => `/team_members/teams/creation_status/${id}`,
|
|
21510
|
+
},
|
|
21511
|
+
integrations: {
|
|
21512
|
+
zapier: {
|
|
21513
|
+
api_keys: "/neeto_integrations/zapier/api_keys",
|
|
21514
|
+
},
|
|
21515
|
+
},
|
|
21516
|
+
};
|
|
21517
|
+
const THIRD_PARTY_ROUTES = {
|
|
21518
|
+
webhooks: { site: "https://webhook.site/" },
|
|
21519
|
+
slack: {
|
|
21520
|
+
loginWithPassword: (workspace) => `https://${workspace}.slack.com/sign_in_with_password`,
|
|
21521
|
+
},
|
|
21522
|
+
zapier: {
|
|
21523
|
+
login: "https://zapier.com/",
|
|
21524
|
+
logOut: "https://zapier.com/logout",
|
|
21525
|
+
zapEditor: (zapId) => `https://zapier.com/editor/${zapId}`,
|
|
21526
|
+
},
|
|
21527
|
+
google: {
|
|
21528
|
+
signin: "https://accounts.google.com/v3/signin/identifier?hl=en-gb&ifkv=ASKXGp0nW770RS7xin2puSwbGDpGCeaVKDtCgfpEU73fYmhMKbqUjukBQ5x8kdvEVxQ7OvcrnUo8sg&flowName=GlifWebSignIn&flowEntry=ServiceLogin&dsh=S688843923%3A1704795906762870&theme=glif",
|
|
21529
|
+
password: "https://accounts.google.com/v3/signin/challenge/pwd",
|
|
21530
|
+
totpChallenge: "https://accounts.google.com/v3/signin/challenge/totp",
|
|
21531
|
+
challengeSelection: "https://accounts.google.com/v3/signin/challenge/selection",
|
|
21532
|
+
myAccount: "https://myaccount.google.com/",
|
|
21533
|
+
chooseAccount: "accounts.google.com/o/oauth2/auth/oauthchooseaccount",
|
|
21534
|
+
consentScreen: "accounts.google.com/signin/oauth/consent",
|
|
21535
|
+
warningScreen: "accounts.google.com/signin/oauth/warning",
|
|
21536
|
+
additionalInfoScreen: "accounts.google.com/signin/oauth/id",
|
|
21537
|
+
consentSummary: "accounts.google.com/signin/oauth/v2/consentsummary",
|
|
21538
|
+
},
|
|
21539
|
+
};
|
|
21540
|
+
const NEETO_ROUTES = {
|
|
21541
|
+
imageUploader: "/neeto_image_uploader_engine",
|
|
21542
|
+
};
|
|
21543
|
+
|
|
21554
21544
|
const CHAT_WIDGET_TEXTS = {
|
|
21555
21545
|
newConversation: "Ask a question",
|
|
21556
21546
|
welcomeChatBubble: "Hi! I'm here to assist you with any questions you may have. What can I do for you?",
|
|
@@ -21646,6 +21636,9 @@ const COMMON_TEXTS = {
|
|
|
21646
21636
|
skipCleanup: "SKIP_CLEANUP",
|
|
21647
21637
|
skipSetup: "SKIP_SETUP",
|
|
21648
21638
|
};
|
|
21639
|
+
const ORGANIZATION_TEXTS = {
|
|
21640
|
+
subdomainAvailable: "Subdomain is available",
|
|
21641
|
+
};
|
|
21649
21642
|
|
|
21650
21643
|
/* eslint-disable playwright/require-top-level-describe */
|
|
21651
21644
|
/* eslint-disable playwright/no-standalone-expect */
|
|
@@ -21675,12 +21668,8 @@ class HelpAndProfilePage {
|
|
|
21675
21668
|
}).toPass({ timeout: 35000 + widgetVisibilityTimeout * 2 });
|
|
21676
21669
|
};
|
|
21677
21670
|
this.openAndVerifyChatWidgetV2 = async () => {
|
|
21678
|
-
const chatInitializationApis = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
21679
|
-
baseUrl: this.chatApiBaseURL,
|
|
21680
|
-
times: 3,
|
|
21681
|
-
});
|
|
21682
21671
|
await this.page.reload();
|
|
21683
|
-
await
|
|
21672
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
21684
21673
|
await test$2.step("Step 1: Open live chat and verify iframe", this.openLiveChatAndVerify);
|
|
21685
21674
|
await test$2.step("Step 2: Close and reopen live chat frame", async () => {
|
|
21686
21675
|
await this.page.getByTestId(CHAT_WIDGET_SELECTORS.closeChat).click();
|
|
@@ -23679,12 +23668,8 @@ class IntegrationBase {
|
|
|
23679
23668
|
};
|
|
23680
23669
|
this.gotoIntegrationIndex = async () => {
|
|
23681
23670
|
if (isNotEmpty(this.integrationRouteIndex)) {
|
|
23682
|
-
const integrationIndexPromise = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
23683
|
-
times: 0,
|
|
23684
|
-
...this.integrationRouteResponsesParams,
|
|
23685
|
-
});
|
|
23686
23671
|
await this.page.goto(this.integrationRouteIndex, { timeout: 20000 });
|
|
23687
|
-
await
|
|
23672
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
23688
23673
|
}
|
|
23689
23674
|
};
|
|
23690
23675
|
this.page = page;
|
|
@@ -23719,13 +23704,12 @@ class GooglePage extends IntegrationBase {
|
|
|
23719
23704
|
await this.selectGoogleAccount(appName);
|
|
23720
23705
|
if (process.env.TEST_ENV === ENVIRONMENT.staging) {
|
|
23721
23706
|
await this.stagingConsentFlow();
|
|
23707
|
+
return;
|
|
23722
23708
|
}
|
|
23723
|
-
|
|
23724
|
-
|
|
23725
|
-
|
|
23726
|
-
|
|
23727
|
-
.click();
|
|
23728
|
-
}
|
|
23709
|
+
await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.consentScreen));
|
|
23710
|
+
await this.page
|
|
23711
|
+
.getByRole("button", { name: GOOGLE_LOGIN_TEXTS.allow })
|
|
23712
|
+
.click();
|
|
23729
23713
|
};
|
|
23730
23714
|
this.selectGoogleAccount = async (appName) => {
|
|
23731
23715
|
const neetoAutomationLocator = this.page.getByRole("link", {
|
|
@@ -23736,16 +23720,17 @@ class GooglePage extends IntegrationBase {
|
|
|
23736
23720
|
const verificationCode = this.page
|
|
23737
23721
|
.locator("form")
|
|
23738
23722
|
.getByText(GOOGLE_LOGIN_TEXTS.verificationCode);
|
|
23739
|
-
|
|
23740
|
-
await this.enterTotpCode(verificationCode);
|
|
23741
|
-
}
|
|
23723
|
+
this.page.url().includes(THIRD_PARTY_ROUTES.google.totpChallenge) &&
|
|
23724
|
+
(await this.enterTotpCode(verificationCode));
|
|
23742
23725
|
await this.handleNotVerifiedPage();
|
|
23743
|
-
|
|
23726
|
+
const signInHeading = this.page.getByRole("heading", {
|
|
23744
23727
|
name: GOOGLE_LOGIN_TEXTS.signInHeading(appName),
|
|
23745
|
-
})
|
|
23728
|
+
});
|
|
23729
|
+
await expect(signInHeading).toBeVisible();
|
|
23746
23730
|
await this.page
|
|
23747
23731
|
.getByRole("button", { name: GOOGLE_LOGIN_TEXTS.continue })
|
|
23748
23732
|
.click();
|
|
23733
|
+
await expect(signInHeading).toBeHidden({ timeout: 10000 });
|
|
23749
23734
|
};
|
|
23750
23735
|
this.loginToGoogle = async () => {
|
|
23751
23736
|
await this.page.goto(THIRD_PARTY_ROUTES.google.signin, { timeout: 20000 });
|
|
@@ -23768,11 +23753,10 @@ class GooglePage extends IntegrationBase {
|
|
|
23768
23753
|
await this.page
|
|
23769
23754
|
.getByRole("button", { name: GOOGLE_LOGIN_TEXTS.next })
|
|
23770
23755
|
.click();
|
|
23771
|
-
|
|
23772
|
-
await this.page
|
|
23756
|
+
this.page.url().includes(THIRD_PARTY_ROUTES.google.challengeSelection) &&
|
|
23757
|
+
(await this.page
|
|
23773
23758
|
.locator(GOOGLE_LOGIN_SELECTORS.totpChallengeSelector)
|
|
23774
|
-
.click();
|
|
23775
|
-
}
|
|
23759
|
+
.click());
|
|
23776
23760
|
await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.totpChallenge));
|
|
23777
23761
|
const twoStepVerification = this.page.locator("form").getByRole("heading", {
|
|
23778
23762
|
name: GOOGLE_LOGIN_TEXTS.twoStepVerification,
|
|
@@ -23809,11 +23793,10 @@ class GooglePage extends IntegrationBase {
|
|
|
23809
23793
|
};
|
|
23810
23794
|
this.stagingConsentFlow = async ({ abortFlow = false, allowPermissions = true, } = {}) => {
|
|
23811
23795
|
await this.handleNotVerifiedPage();
|
|
23812
|
-
|
|
23813
|
-
await this.page
|
|
23796
|
+
this.page.url().includes(THIRD_PARTY_ROUTES.google.additionalInfoScreen) &&
|
|
23797
|
+
(await this.page
|
|
23814
23798
|
.getByRole("button", { name: GOOGLE_LOGIN_TEXTS.continue })
|
|
23815
|
-
.click({ timeout: 20000 });
|
|
23816
|
-
}
|
|
23799
|
+
.click({ timeout: 20000 }));
|
|
23817
23800
|
await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.consentSummary));
|
|
23818
23801
|
if (abortFlow) {
|
|
23819
23802
|
await this.page
|
|
@@ -23919,39 +23902,33 @@ class SlackPage extends IntegrationBase {
|
|
|
23919
23902
|
await this.disconnect();
|
|
23920
23903
|
await this.verifyIntegrationStatus("disconnected");
|
|
23921
23904
|
};
|
|
23922
|
-
this.updateConfigureSlackChannel = async ({ newSlackChannel = "random",
|
|
23905
|
+
this.updateConfigureSlackChannel = async ({ newSlackChannel = "random",
|
|
23906
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23907
|
+
interceptMultipleResponsesParams = {},
|
|
23908
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23909
|
+
refreshInterceptMultipleResponsesParams = {}, refreshChannelList = false, }) => {
|
|
23923
23910
|
await this.page.getByTestId(INTEGRATION_SELECTORS.manageButton).click();
|
|
23924
23911
|
await this.page
|
|
23925
23912
|
.getByRole("button", { name: this.t("neetoSlack.common.edit") })
|
|
23926
23913
|
.click();
|
|
23927
|
-
|
|
23928
|
-
await this.clickOnChannelListRefreshButton(refreshInterceptMultipleResponsesParams);
|
|
23929
|
-
}
|
|
23914
|
+
refreshChannelList && (await this.clickOnChannelListRefreshButton());
|
|
23930
23915
|
await this.page.getByTestId(COMMON_SELECTORS.selectContainer).click();
|
|
23931
23916
|
await this.page
|
|
23932
23917
|
.getByTestId(COMMON_SELECTORS.dropdownMenu)
|
|
23933
23918
|
.getByText(newSlackChannel)
|
|
23934
23919
|
.click();
|
|
23935
|
-
|
|
23936
|
-
times: 0,
|
|
23937
|
-
...interceptMultipleResponsesParams,
|
|
23938
|
-
});
|
|
23939
|
-
await this.page
|
|
23940
|
-
.getByRole("button", { name: this.t("neetoSlack.common.save") })
|
|
23941
|
-
.click();
|
|
23942
|
-
await savePromise;
|
|
23920
|
+
await this.neetoPlaywrightUtilities.saveChanges();
|
|
23943
23921
|
};
|
|
23944
|
-
this.clickOnChannelListRefreshButton = async (
|
|
23945
|
-
|
|
23946
|
-
times: 0,
|
|
23947
|
-
...refreshInterceptMultipleResponsesParams,
|
|
23948
|
-
});
|
|
23922
|
+
this.clickOnChannelListRefreshButton = async () => {
|
|
23923
|
+
//Use getByTestId when this issue https://github.com/bigbinary/neeto-slack-nano/issues/438 is resolved
|
|
23949
23924
|
await this.page
|
|
23950
23925
|
.getByRole("button", {
|
|
23951
23926
|
name: this.t("neetoSlack.slack.channelListRefreshButton"),
|
|
23952
23927
|
})
|
|
23953
23928
|
.click();
|
|
23954
|
-
await
|
|
23929
|
+
await this.neetoPlaywrightUtilities.verifyToast({
|
|
23930
|
+
message: this.t("neetoSlack.slack.channelListRefreshToastr"),
|
|
23931
|
+
});
|
|
23955
23932
|
};
|
|
23956
23933
|
this.loginToSlackWebapp = async (slackWebappPage, customCredentials) => {
|
|
23957
23934
|
this.slackWebappPage = slackWebappPage;
|
|
@@ -23974,10 +23951,9 @@ class SlackPage extends IntegrationBase {
|
|
|
23974
23951
|
.locator(SLACK_SELECTORS.redirectOpenInBrowser)
|
|
23975
23952
|
.click();
|
|
23976
23953
|
await this.setupCloseHandlers(slackWebappPage);
|
|
23954
|
+
return;
|
|
23977
23955
|
}
|
|
23978
|
-
|
|
23979
|
-
throw new Error("ENV variable SLACK_LOGIN_EMAIL or SLACK_LOGIN_PASSWORD or SLACK_WORKSPACE is not defined.");
|
|
23980
|
-
}
|
|
23956
|
+
throw new Error("ENV variable SLACK_LOGIN_EMAIL or SLACK_LOGIN_PASSWORD or SLACK_WORKSPACE is not defined.");
|
|
23981
23957
|
};
|
|
23982
23958
|
this.logoutFromSlackWebApp = async () => {
|
|
23983
23959
|
await this.slackWebappPage
|
|
@@ -24621,9 +24597,6 @@ class EditorPage {
|
|
|
24621
24597
|
const fileUploader = await fileUploaderPromise;
|
|
24622
24598
|
const imagePath = Path.join(__dirname, filePath);
|
|
24623
24599
|
await fileUploader.setFiles(imagePath);
|
|
24624
|
-
await this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
24625
|
-
responseUrl: ROUTES.attachment,
|
|
24626
|
-
});
|
|
24627
24600
|
await expect(this.attachmentPreview).toBeVisible();
|
|
24628
24601
|
if (shouldRemoveAttachment) {
|
|
24629
24602
|
await this.attachmentPreview
|
|
@@ -24838,13 +24811,9 @@ class EditorPage {
|
|
|
24838
24811
|
class ImageUploader {
|
|
24839
24812
|
constructor(page, neetoPlaywrightUtilities) {
|
|
24840
24813
|
this.submitCroppedImage = async () => {
|
|
24841
|
-
const cropImage = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
24842
|
-
responseUrl: ROUTES.directUploads,
|
|
24843
|
-
});
|
|
24844
24814
|
await this.page
|
|
24845
24815
|
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.cropSubmitButton)
|
|
24846
24816
|
.click();
|
|
24847
|
-
await cropImage;
|
|
24848
24817
|
};
|
|
24849
24818
|
this.removeImage = async () => {
|
|
24850
24819
|
await this.page
|
|
@@ -24908,13 +24877,9 @@ class ImageUploader {
|
|
|
24908
24877
|
};
|
|
24909
24878
|
this.selectImageFromWeb = async ({ nthImage = 0, searchTerm = "", toggleOrginalImage = false, toggleAspectRatioLock = false, aspectRatioHeight = "9", aspectRatioWidth = "16", width = "100", height = "100", } = {}) => {
|
|
24910
24879
|
await this.openImageLibrary();
|
|
24911
|
-
const switchImageTab = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
24912
|
-
responseUrl: NEETO_ROUTES.imageUploader,
|
|
24913
|
-
});
|
|
24914
24880
|
await this.page
|
|
24915
24881
|
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.unsplashTab)
|
|
24916
24882
|
.click();
|
|
24917
|
-
await switchImageTab;
|
|
24918
24883
|
if (isNotEmpty(searchTerm)) {
|
|
24919
24884
|
await this.page
|
|
24920
24885
|
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.unsplashSearchInput)
|
|
@@ -25013,17 +24978,15 @@ class TeamMembers {
|
|
|
25013
24978
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
25014
24979
|
await this.neetoPlaywrightUtilities.verifyToast();
|
|
25015
24980
|
};
|
|
25016
|
-
this.searchAndVerifyMemberByEmail = async ({ email,
|
|
25017
|
-
|
|
25018
|
-
|
|
25019
|
-
...interceptOptions,
|
|
25020
|
-
});
|
|
24981
|
+
this.searchAndVerifyMemberByEmail = async ({ email,
|
|
24982
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
24983
|
+
interceptOptions = {}, }) => {
|
|
25021
24984
|
await this.page.getByTestId(MEMBER_SELECTORS.searchTextField).fill(email);
|
|
25022
|
-
await searchMembers;
|
|
25023
24985
|
const emailSubstr = email.length > 20 ? email.substring(0, 20) : email;
|
|
25024
24986
|
await expect(this.page.getByTestId(NEETO_FILTERS_SELECTORS.searchTermBlock)).toContainText(emailSubstr);
|
|
24987
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
24988
|
+
await expect(this.page.locator(COMMON_SELECTORS.tableSpinner)).toBeHidden();
|
|
25025
24989
|
await expect(this.page.getByRole("cell", { name: email, exact: true })).toBeVisible();
|
|
25026
|
-
await expect(this.page.getByTestId(COMMON_SELECTORS.tableSpinner)).toBeHidden();
|
|
25027
24990
|
};
|
|
25028
24991
|
this.editMemberViaUI = async ({ email = "", firstName = "", lastName = "", role = "standard", } = {}) => {
|
|
25029
24992
|
await this.page.getByTestId(MEMBER_SELECTORS.dropDownIcon).click();
|
|
@@ -25060,13 +25023,9 @@ class TeamMembers {
|
|
|
25060
25023
|
.getByTestId(COMMON_SELECTORS.actionSelectIndicator)
|
|
25061
25024
|
.click();
|
|
25062
25025
|
for (const option of selectedOptions) {
|
|
25063
|
-
const fetchMembers = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
25064
|
-
responseUrl: API_ROUTES.teamMembers.index,
|
|
25065
|
-
});
|
|
25066
25026
|
await this.page
|
|
25067
25027
|
.getByTestId(COMMON_SELECTORS.selectOption(option))
|
|
25068
25028
|
.click();
|
|
25069
|
-
await fetchMembers;
|
|
25070
25029
|
}
|
|
25071
25030
|
};
|
|
25072
25031
|
this.filterMembers = async ({ email = { id: "", condition: "Is" }, roles = [], name = "", }) => {
|
|
@@ -25079,23 +25038,14 @@ class TeamMembers {
|
|
|
25079
25038
|
await this.page
|
|
25080
25039
|
.getByTestId(COMMON_SELECTORS.selectOption(email.condition))
|
|
25081
25040
|
.click();
|
|
25082
|
-
const fetchMembers = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
25083
|
-
responseUrl: API_ROUTES.teamMembers.index,
|
|
25084
|
-
});
|
|
25085
25041
|
await this.page
|
|
25086
25042
|
.getByTestId(NEETO_FILTERS_SELECTORS.filtersEmailFilter)
|
|
25087
25043
|
.fill(email.id);
|
|
25088
|
-
await fetchMembers;
|
|
25089
25044
|
}
|
|
25090
|
-
|
|
25091
|
-
|
|
25092
|
-
responseUrl: API_ROUTES.teamMembers.index,
|
|
25093
|
-
});
|
|
25094
|
-
await this.page
|
|
25045
|
+
isPresent(name) &&
|
|
25046
|
+
(await this.page
|
|
25095
25047
|
.getByTestId(NEETO_FILTERS_SELECTORS.neetoFiltersNameFilterField)
|
|
25096
|
-
.fill(name);
|
|
25097
|
-
await fetchMembers;
|
|
25098
|
-
}
|
|
25048
|
+
.fill(name));
|
|
25099
25049
|
isPresent(roles) &&
|
|
25100
25050
|
(await this.filterMembersByMultiSelect({ selectedOptions: roles }));
|
|
25101
25051
|
await this.page
|
|
@@ -25143,7 +25093,8 @@ class TeamMembers {
|
|
|
25143
25093
|
.getByTestId(TABLE_SELECTORS.columnMenuButton)
|
|
25144
25094
|
.click();
|
|
25145
25095
|
await this.page.getByRole("button", { name: actionButtonText }).click();
|
|
25146
|
-
await
|
|
25096
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
25097
|
+
await expect(this.page.locator(COMMON_SELECTORS.tableSpinner)).toBeHidden();
|
|
25147
25098
|
};
|
|
25148
25099
|
this.toggleMemberColumns = async ({ columns = [], bulkAction, }) => {
|
|
25149
25100
|
await this.page.getByTestId(COMMON_SELECTORS.columnsDropdownButton).click();
|
|
@@ -25176,7 +25127,9 @@ class TeamMembers {
|
|
|
25176
25127
|
}
|
|
25177
25128
|
}
|
|
25178
25129
|
|
|
25179
|
-
const loginWithoutSSO = async ({ page,
|
|
25130
|
+
const loginWithoutSSO = async ({ page,
|
|
25131
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
25132
|
+
neetoPlaywrightUtilities, loginPath = "/", }) => {
|
|
25180
25133
|
if (shouldSkipSetupAndTeardown())
|
|
25181
25134
|
return;
|
|
25182
25135
|
await page.goto(loginPath, { timeout: 20000 });
|
|
@@ -25186,11 +25139,9 @@ const loginWithoutSSO = async ({ page, neetoPlaywrightUtilities, loginPath = "/"
|
|
|
25186
25139
|
await page
|
|
25187
25140
|
.getByTestId(LOGIN_SELECTORS.passwordTextField)
|
|
25188
25141
|
.fill(CREDENTIALS.password);
|
|
25189
|
-
const
|
|
25190
|
-
|
|
25191
|
-
});
|
|
25192
|
-
await page.getByTestId(LOGIN_SELECTORS.submitButton).click();
|
|
25193
|
-
await login;
|
|
25142
|
+
const submitButton = page.getByTestId(LOGIN_SELECTORS.submitButton);
|
|
25143
|
+
await submitButton.click();
|
|
25144
|
+
await expect(submitButton).toBeHidden({ timeout: 15000 });
|
|
25194
25145
|
const userCredentials = readFileSyncIfExists();
|
|
25195
25146
|
await page.context().storageState({ path: STORAGE_STATE });
|
|
25196
25147
|
const mergedCredentials = mergeAll([readFileSyncIfExists(), userCredentials]);
|
|
@@ -25224,14 +25175,11 @@ class OrganizationPage {
|
|
|
25224
25175
|
isNeetoAuth
|
|
25225
25176
|
? await this.page.goto(ROUTES.neetoAuthSignup, { timeout: 20000 })
|
|
25226
25177
|
: await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${appNameInLowerCase}.net/admin`, { timeout: 20000 });
|
|
25178
|
+
const submitButton = this.page.getByTestId(SIGNUP_SELECTORS.submitButton);
|
|
25227
25179
|
await this.page.getByTestId(SIGNUP_SELECTORS.emailTextField).fill(email);
|
|
25228
|
-
|
|
25229
|
-
|
|
25230
|
-
|
|
25231
|
-
baseUrl: NEETO_AUTH_BASE_URL(),
|
|
25232
|
-
});
|
|
25233
|
-
await this.page.getByTestId(SIGNUP_SELECTORS.submitButton).click();
|
|
25234
|
-
await signup;
|
|
25180
|
+
await submitButton.click();
|
|
25181
|
+
await expect(submitButton).toBeHidden({ timeout: 30000 });
|
|
25182
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
25235
25183
|
await this.page.getByTestId(SIGNUP_SELECTORS.otpTextBox).fill(defaultOtp);
|
|
25236
25184
|
await this.fillOrganizationDetails({
|
|
25237
25185
|
credentials: {
|
|
@@ -25283,15 +25231,9 @@ class OrganizationPage {
|
|
|
25283
25231
|
if (subdomainErrorCount !== 0) {
|
|
25284
25232
|
const subdomainErrorText = await subdomainError.innerText();
|
|
25285
25233
|
const newOrganizationName = extractSubdomainFromError(subdomainErrorText);
|
|
25286
|
-
const subdomainAvailability = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
25287
|
-
responseUrl: ROUTES.subdomainAvailability,
|
|
25288
|
-
timeout: 60 * 1000,
|
|
25289
|
-
baseUrl: NEETO_AUTH_BASE_URL(),
|
|
25290
|
-
});
|
|
25291
25234
|
await this.page
|
|
25292
25235
|
.getByTestId(SIGNUP_SELECTORS.subdomainNameTextField)
|
|
25293
25236
|
.fill(newOrganizationName);
|
|
25294
|
-
await subdomainAvailability;
|
|
25295
25237
|
subdomainErrorCount = await subdomainError.count();
|
|
25296
25238
|
if (subdomainErrorCount === 0) {
|
|
25297
25239
|
updateCredentials({
|
|
@@ -25334,15 +25276,10 @@ class OrganizationPage {
|
|
|
25334
25276
|
.fill(lastName);
|
|
25335
25277
|
country && (await this.changeCountry(country));
|
|
25336
25278
|
await this.page.getByTestId(COMMON_SELECTORS.checkbox).click();
|
|
25337
|
-
const
|
|
25338
|
-
|
|
25339
|
-
|
|
25340
|
-
|
|
25341
|
-
timeout: 60000,
|
|
25342
|
-
});
|
|
25343
|
-
await this.page.getByTestId(SIGNUP_SELECTORS.profileSubmitButton).click();
|
|
25344
|
-
await submitProfile;
|
|
25345
|
-
await expect(this.page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden({ timeout: 15000 });
|
|
25279
|
+
const profileSubmitButton = this.page.getByTestId(SIGNUP_SELECTORS.profileSubmitButton);
|
|
25280
|
+
await profileSubmitButton.click();
|
|
25281
|
+
await expect(profileSubmitButton).toBeHidden({ timeout: 45000 });
|
|
25282
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
25346
25283
|
};
|
|
25347
25284
|
this.loginAndOnboard = async ({ email, firstName, lastName, country, handleOnboarding, baseURL = process.env.BASE_URL, }) => {
|
|
25348
25285
|
await this.page.goto(`${baseURL}${ROUTES.admin}`, { timeout: 20000 });
|
|
@@ -25359,13 +25296,9 @@ class OrganizationPage {
|
|
|
25359
25296
|
await this.page
|
|
25360
25297
|
.getByTestId(SIGNUP_SELECTORS.emailTextField)
|
|
25361
25298
|
.fill(credentials.email);
|
|
25362
|
-
const
|
|
25363
|
-
|
|
25364
|
-
|
|
25365
|
-
baseUrl: NEETO_AUTH_BASE_URL(),
|
|
25366
|
-
});
|
|
25367
|
-
await this.page.getByTestId(SIGNUP_SELECTORS.submitButton).click();
|
|
25368
|
-
await signup;
|
|
25299
|
+
const submitButton = this.page.getByTestId(SIGNUP_SELECTORS.submitButton);
|
|
25300
|
+
await submitButton.click();
|
|
25301
|
+
await expect(submitButton).toBeHidden({ timeout: 10000 });
|
|
25369
25302
|
if (fetchOtpFromEmail !== undefined) {
|
|
25370
25303
|
otp = await fetchOtpFromEmail({
|
|
25371
25304
|
email: credentials.email,
|
|
@@ -25382,35 +25315,27 @@ class OrganizationPage {
|
|
|
25382
25315
|
return { STORAGE_STATE, baseURL: process.env.BASE_URL };
|
|
25383
25316
|
};
|
|
25384
25317
|
this.fillOrganizationDetails = async ({ credentials, appName, }) => {
|
|
25318
|
+
const subdomainError = this.page.getByTestId(SIGNUP_SELECTORS.subdomainError);
|
|
25319
|
+
const organizationSubmitButton = this.page.getByTestId(SIGNUP_SELECTORS.organizationSubmitButton);
|
|
25385
25320
|
await this.page
|
|
25386
25321
|
.getByTestId(SIGNUP_SELECTORS.organizationNameTextField)
|
|
25387
25322
|
.fill(humanize(credentials.businessName));
|
|
25388
|
-
const fetchSubdomainAvailability = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
25389
|
-
responseUrl: ROUTES.subdomainAvailability,
|
|
25390
|
-
timeout: 60 * 1000,
|
|
25391
|
-
baseUrl: NEETO_AUTH_BASE_URL(),
|
|
25392
|
-
});
|
|
25393
25323
|
await this.page
|
|
25394
25324
|
.getByTestId(SIGNUP_SELECTORS.subdomainNameTextField)
|
|
25395
25325
|
.fill(credentials.subdomainName);
|
|
25396
|
-
await fetchSubdomainAvailability;
|
|
25397
|
-
const subdomainError = this.page.getByTestId(SIGNUP_SELECTORS.subdomainError);
|
|
25398
25326
|
const subdomainErrorCount = await subdomainError.count();
|
|
25399
|
-
|
|
25400
|
-
|
|
25401
|
-
|
|
25402
|
-
|
|
25403
|
-
times: 2,
|
|
25404
|
-
timeout: 60 * 1000,
|
|
25405
|
-
baseUrl: NEETO_AUTH_BASE_URL(),
|
|
25406
|
-
});
|
|
25407
|
-
await this.page
|
|
25408
|
-
.getByTestId(SIGNUP_SELECTORS.organizationSubmitButton)
|
|
25409
|
-
.click();
|
|
25410
|
-
await fetchProfile;
|
|
25411
|
-
await this.page.waitForURL(`**${ROUTES.profile}`, {
|
|
25412
|
-
timeout: 60 * 1000,
|
|
25327
|
+
subdomainErrorCount !== 0 && (await this.updateSubdomainIfExists(appName));
|
|
25328
|
+
//TODO: Use getByTestId when this issue https://github.com/bigbinary/neeto-auth-web/issues/6460 is resolved
|
|
25329
|
+
await expect(this.page.getByTitle(ORGANIZATION_TEXTS.subdomainAvailable)).toBeVisible({
|
|
25330
|
+
timeout: 45000,
|
|
25413
25331
|
});
|
|
25332
|
+
await organizationSubmitButton.click();
|
|
25333
|
+
await Promise.all([
|
|
25334
|
+
expect(organizationSubmitButton).toBeHidden({ timeout: 45 * 1000 }),
|
|
25335
|
+
this.page.waitForURL(`**${ROUTES.profile}`, {
|
|
25336
|
+
timeout: 45 * 1000,
|
|
25337
|
+
}),
|
|
25338
|
+
]);
|
|
25414
25339
|
await this.setupProfile({
|
|
25415
25340
|
firstName: credentials.firstName,
|
|
25416
25341
|
lastName: credentials.lastName,
|
|
@@ -25547,7 +25472,7 @@ class CustomDomainPage {
|
|
|
25547
25472
|
]);
|
|
25548
25473
|
};
|
|
25549
25474
|
this.deleteCustomDomainViaUI = async () => {
|
|
25550
|
-
await this.page.getByTestId(
|
|
25475
|
+
await this.page.getByTestId(CUSTOM_DOMAIN_SELECTORS.dropdownButton).click();
|
|
25551
25476
|
await this.page
|
|
25552
25477
|
.getByTestId(CUSTOM_DOMAIN_SELECTORS.deleteCustomDomainButton)
|
|
25553
25478
|
.click();
|
|
@@ -25728,7 +25653,9 @@ class TagsPage {
|
|
|
25728
25653
|
await this.page.getByTestId(TAGS_SELECTORS.searchTextField).fill(tagName);
|
|
25729
25654
|
await expect(this.page.getByRole("row", { name: tagName })).toBeVisible();
|
|
25730
25655
|
};
|
|
25731
|
-
this.addTagViaUI = async ({ tagName, addTagsLabel,
|
|
25656
|
+
this.addTagViaUI = async ({ tagName, addTagsLabel,
|
|
25657
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
25658
|
+
tagsResponseUrl, }) => {
|
|
25732
25659
|
await this.page
|
|
25733
25660
|
.getByTestId(COMMON_SELECTORS.header)
|
|
25734
25661
|
.getByTestId(TAGS_SELECTORS.newTagButton)
|
|
@@ -25738,11 +25665,7 @@ class TagsPage {
|
|
|
25738
25665
|
await this.page
|
|
25739
25666
|
.getByTestId(TAGS_SELECTORS.descriptionTextArea)
|
|
25740
25667
|
.fill(faker.lorem.word(7));
|
|
25741
|
-
const waitForSave = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
25742
|
-
responseUrl: tagsResponseUrl,
|
|
25743
|
-
});
|
|
25744
25668
|
await this.page.getByTestId(TAGS_SELECTORS.submitButton).click();
|
|
25745
|
-
await waitForSave;
|
|
25746
25669
|
await this.neetoPlaywrightUtilities.verifyToast();
|
|
25747
25670
|
await this.searchAndVerifyTags(tagName);
|
|
25748
25671
|
};
|
|
@@ -159022,5 +158945,5 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
159022
158945
|
});
|
|
159023
158946
|
};
|
|
159024
158947
|
|
|
159025
|
-
export { API_ROUTES, AUDIT_LOGS_TEXTS, AdminPanelPage, ApiKeysPage, AuditLogsPage, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COLOR, COMMON_SELECTORS, COMMON_TEXTS, CREDENTIALS, CustomCommands, CustomDomainPage as CustomDomainsPage, DATE_TEXTS, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, EMPTY_STORAGE_STATE, ENGAGE_TEXTS, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GooglePage, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, ImageUploader, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailerUtils, Member, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_TEXT_MODIFIER_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PLURAL, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, RolesPage, SELECT_COUNTRY, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TABLE_SELECTORS, TAB_SELECTORS, TAGS_SELECTORS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THANK_YOU_SELECTORS, THEMES_SELECTORS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, TagsPage, TeamMembers, ThankYouPage, USER_AGENTS, WEBHOOK_SELECTORS, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, currencyUtils, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, generateRandomBypassEmail, generateStagingData, getByDataQA, getGlobalUserState, getImagePathAndName, getListCount, headerUtils, hexToRGB, hexToRGBA, hyphenize, i18nFixture, initializeCredentials, initializeTotp, isGithubIssueOpen, joinHyphenCase, joinString, login, loginWithoutSSO, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, simulateClickWithDelay, simulateTypingWithDelay, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
|
|
158948
|
+
export { ADMIN_PANEL_SELECTORS, API_KEYS_SELECTORS, API_ROUTES, AUDIT_LOGS_TEXTS, AdminPanelPage, ApiKeysPage, AuditLogsPage, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COLOR, COMMON_SELECTORS, COMMON_TEXTS, CREDENTIALS, CUSTOM_DOMAIN_SELECTORS, CustomCommands, CustomDomainPage as CustomDomainsPage, DATE_TEXTS, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, EMPTY_STORAGE_STATE, ENGAGE_TEXTS, ENVIRONMENT, EXPANDED_FONT_SIZE, EditorPage, EmbedBase, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GooglePage, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, ImageUploader, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailerUtils, Member, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_TEXT_MODIFIER_SELECTORS, ORGANIZATION_TEXTS, OTP_EMAIL_PATTERN, OrganizationPage, PLURAL, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, RolesPage, SELECT_COUNTRY, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TABLE_SELECTORS, TAB_SELECTORS, TAGS_SELECTORS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THANK_YOU_SELECTORS, THEMES_SELECTORS, THIRD_PARTY_ROUTES, TOASTR_MESSAGES, TagsPage, TeamMembers, ThankYouPage, USER_AGENTS, WEBHOOK_SELECTORS, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, currencyUtils, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, filterUtils, generateRandomBypassEmail, generateStagingData, getByDataQA, getGlobalUserState, getImagePathAndName, getListCount, headerUtils, hexToRGB, hexToRGBA, hyphenize, i18nFixture, initializeCredentials, initializeTotp, isGithubIssueOpen, joinHyphenCase, joinString, login, loginWithoutSSO, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, simulateClickWithDelay, simulateTypingWithDelay, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
|
|
159026
158949
|
//# sourceMappingURL=index.js.map
|