@bigbinary/neeto-playwright-commons 1.27.0 → 1.27.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 +141 -83
- package/index.cjs.js.map +1 -1
- package/index.d.ts +80 -49
- package/index.js +141 -84
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -521,6 +521,14 @@ class SlackApi {
|
|
|
521
521
|
this.fetchMessages = (channelId, unixTimestamp) => this.apiRequest("history", { channel: channelId, oldest: unixTimestamp });
|
|
522
522
|
this.createChannel = (channelName) => this.apiRequest("create", { name: channelName });
|
|
523
523
|
this.addUser = (channelId, userId) => this.apiRequest("invite", { channel: channelId, users: userId });
|
|
524
|
+
this.mockChannelDeleted = (channelId) => this.neetoPlaywrightUtilities.apiRequest({
|
|
525
|
+
url: "/neeto_slack/api/v1/testing/webhooks",
|
|
526
|
+
method: "post",
|
|
527
|
+
data: keysToSnakeCase({
|
|
528
|
+
eventType: "channel_deleted",
|
|
529
|
+
notificationChannelId: channelId,
|
|
530
|
+
}),
|
|
531
|
+
});
|
|
524
532
|
if (!process.env.SLACK_BOT_TOKEN) {
|
|
525
533
|
throw new Error("SLACK_BOT_TOKEN is not set");
|
|
526
534
|
}
|
|
@@ -5025,7 +5033,6 @@ const generateStagingData = (product = "invoice") => {
|
|
|
5025
5033
|
};
|
|
5026
5034
|
};
|
|
5027
5035
|
|
|
5028
|
-
/* eslint-disable playwright/no-skipped-test */
|
|
5029
5036
|
const execCommand = (command) => execSync(command)
|
|
5030
5037
|
.toString("utf-8")
|
|
5031
5038
|
.replace(/[\n\r\s]+$/, "");
|
|
@@ -5190,7 +5197,7 @@ const globalShortcuts = (t) => [
|
|
|
5190
5197
|
},
|
|
5191
5198
|
{
|
|
5192
5199
|
description: t("neetoMolecules.keyboardShortcuts.global.openProductSwitcher"),
|
|
5193
|
-
sequence: "ctrl+
|
|
5200
|
+
sequence: "ctrl+u",
|
|
5194
5201
|
},
|
|
5195
5202
|
];
|
|
5196
5203
|
const generatePhoneNumber = () => `${"+91"} 9${faker.string.numeric(4)} ${faker.string.numeric(5)}`;
|
|
@@ -5356,8 +5363,9 @@ const NEETO_FILTERS_SELECTORS = {
|
|
|
5356
5363
|
};
|
|
5357
5364
|
|
|
5358
5365
|
const HELP_CENTER_SELECTORS = {
|
|
5366
|
+
helpMenuBtn: "help-menu-button",
|
|
5359
5367
|
helpButton: "help-button",
|
|
5360
|
-
documentationButton: "help-link-help-
|
|
5368
|
+
documentationButton: "help-link-help-articles-button",
|
|
5361
5369
|
keyboardShortcutButton: "help-link-keyboard-shortcut-button",
|
|
5362
5370
|
chatButton: "help-link-live-chat-button",
|
|
5363
5371
|
whatsNewButton: "help-link-engage-button",
|
|
@@ -114395,29 +114403,21 @@ const THEMES_TEXTS = {
|
|
|
114395
114403
|
|
|
114396
114404
|
class HelpAndProfilePage {
|
|
114397
114405
|
constructor({ page, neetoPlaywrightUtilities, chatApiBaseURL, kbDocsBaseURL, changelogBaseURL, }) {
|
|
114398
|
-
this.hoverOnBody = () => this.page.locator("body").hover({ timeout: 10000 });
|
|
114399
114406
|
this.openHelpCenter = async () => {
|
|
114407
|
+
const floatingActionMenuBtn = this.page.getByTestId(COMMON_SELECTORS.floatingActionMenuButton);
|
|
114400
114408
|
await expect(async () => {
|
|
114401
|
-
await
|
|
114402
|
-
|
|
114403
|
-
await
|
|
114404
|
-
await floatingActionMenuButton.hover();
|
|
114405
|
-
await expect(this.page.getByTestId(HELP_CENTER_SELECTORS.chatButton)).toBeVisible();
|
|
114409
|
+
await floatingActionMenuBtn.scrollIntoViewIfNeeded();
|
|
114410
|
+
await floatingActionMenuBtn.hover();
|
|
114411
|
+
await expect(this.page.getByTestId(HELP_CENTER_SELECTORS.whatsNewButton)).toBeVisible();
|
|
114406
114412
|
}).toPass({ timeout: 60000 });
|
|
114407
114413
|
};
|
|
114408
|
-
this.openLiveChatAndVerify = async (
|
|
114409
|
-
await
|
|
114410
|
-
|
|
114411
|
-
|
|
114412
|
-
|
|
114413
|
-
|
|
114414
|
-
|
|
114415
|
-
await expect(this.neetoChatSpinner).toBeHidden({ timeout: 20 * 1000 });
|
|
114416
|
-
await expect(this.neetoChatWidget).toBeVisible({
|
|
114417
|
-
timeout: widgetVisibilityTimeout,
|
|
114418
|
-
});
|
|
114419
|
-
}).toPass({ timeout: 35000 + widgetVisibilityTimeout * 2 });
|
|
114420
|
-
};
|
|
114414
|
+
this.openLiveChatAndVerify = () => expect(async () => {
|
|
114415
|
+
await this.openHelpCenter();
|
|
114416
|
+
await this.page.getByTestId(HELP_CENTER_SELECTORS.helpMenuBtn).click();
|
|
114417
|
+
await this.page.getByTestId(HELP_CENTER_SELECTORS.chatButton).click();
|
|
114418
|
+
await expect(this.neetoChatSpinner).toBeHidden({ timeout: 20000 });
|
|
114419
|
+
await expect(this.neetoChatWidget).toBeVisible({ timeout: 10000 });
|
|
114420
|
+
}).toPass({ timeout: 60000 });
|
|
114421
114421
|
/**
|
|
114422
114422
|
* @deprecated This method is deprecated. Use openAndVerifyChatWidget instead.
|
|
114423
114423
|
*/
|
|
@@ -114437,7 +114437,7 @@ class HelpAndProfilePage {
|
|
|
114437
114437
|
this.openAndVerifyChatWidget = async () => {
|
|
114438
114438
|
await this.page.reload();
|
|
114439
114439
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
114440
|
-
await test$1.step("1: Open live chat
|
|
114440
|
+
await test$1.step("1: Open live chat", this.openLiveChatAndVerify);
|
|
114441
114441
|
await test$1.step("2: Close and reopen live chat frame", async () => {
|
|
114442
114442
|
await this.page.getByTestId(CHAT_WIDGET_SELECTORS.closeChat).click();
|
|
114443
114443
|
await expect(this.neetoChatWidget).toBeHidden({ timeout: 35000 });
|
|
@@ -114466,6 +114466,7 @@ class HelpAndProfilePage {
|
|
|
114466
114466
|
this.openAndVerifyHelpArticles = async () => {
|
|
114467
114467
|
await test$1.step("1: Open Help Center links", this.openHelpCenter);
|
|
114468
114468
|
await test$1.step("2: Open and verify help articles link", async () => {
|
|
114469
|
+
await this.page.getByTestId(HELP_CENTER_SELECTORS.helpMenuBtn).click();
|
|
114469
114470
|
const helpArticlesPromise = this.page.waitForEvent("popup");
|
|
114470
114471
|
await this.page
|
|
114471
114472
|
.getByTestId(HELP_CENTER_SELECTORS.documentationButton)
|
|
@@ -114506,7 +114507,7 @@ class HelpAndProfilePage {
|
|
|
114506
114507
|
});
|
|
114507
114508
|
};
|
|
114508
114509
|
this.openAndVerifyChangelog = async () => {
|
|
114509
|
-
await test$1.step("1: Open
|
|
114510
|
+
await test$1.step("1: Open changelog", this.openChangelogPane);
|
|
114510
114511
|
await test$1.step("2: Close and reopen changelog pane", async () => {
|
|
114511
114512
|
await this.page
|
|
114512
114513
|
.getByTestId(CHANGELOG_WIDGET_SELECTORS.closeButton)
|
|
@@ -114523,8 +114524,10 @@ class HelpAndProfilePage {
|
|
|
114523
114524
|
await this.neetoPlaywrightUtilities.waitForPageLoad({
|
|
114524
114525
|
customPageContext: changelogPage,
|
|
114525
114526
|
});
|
|
114526
|
-
await
|
|
114527
|
-
|
|
114527
|
+
await Promise.all([
|
|
114528
|
+
expect(changelogPage).toHaveURL(this.changelogBaseURL),
|
|
114529
|
+
expect(changelogPage.getByRole("button", { name: ENGAGE_TEXTS.subscribe })).toBeVisible({ timeout: 10000 }),
|
|
114530
|
+
]);
|
|
114528
114531
|
await changelogPage.close();
|
|
114529
114532
|
});
|
|
114530
114533
|
};
|
|
@@ -114643,21 +114646,21 @@ class HelpAndProfilePage {
|
|
|
114643
114646
|
await expect(this.page.getByTestId(COMMON_SELECTORS.appSwitcherWrapper)).toBeVisible();
|
|
114644
114647
|
}).toPass({ timeout: 45000 }));
|
|
114645
114648
|
await test$1.step("2: Verify search functionality", async () => {
|
|
114646
|
-
const
|
|
114647
|
-
const
|
|
114649
|
+
const playdash = this.page.getByTestId(COMMON_SELECTORS.appLink(productName));
|
|
114650
|
+
const replay = this.page.getByTestId(COMMON_SELECTORS.appLink("Replay"));
|
|
114648
114651
|
const searchInput = this.page.getByTestId(COMMON_SELECTORS.productSwitcherSearchInput);
|
|
114649
114652
|
await searchInput.fill(faker.word.words(3));
|
|
114650
114653
|
//TODO: Use data-testid label when this https://github.com/bigbinary/neeto-molecules/issues/2114 is resolved
|
|
114651
114654
|
await expect(this.page.getByText(this.t("neetoMolecules.productSwitcher.noApps"))).toBeVisible();
|
|
114652
114655
|
await searchInput.fill(searchQueryPartial);
|
|
114653
114656
|
await Promise.all([
|
|
114654
|
-
expect(
|
|
114655
|
-
expect(
|
|
114657
|
+
expect(playdash).toBeVisible(),
|
|
114658
|
+
expect(replay).toBeVisible(),
|
|
114656
114659
|
]);
|
|
114657
114660
|
await searchInput.fill(searchQueryFull);
|
|
114658
114661
|
await Promise.all([
|
|
114659
|
-
expect(
|
|
114660
|
-
expect(
|
|
114662
|
+
expect(playdash).toBeVisible(),
|
|
114663
|
+
expect(replay).toBeHidden(),
|
|
114661
114664
|
]);
|
|
114662
114665
|
});
|
|
114663
114666
|
};
|
|
@@ -114684,7 +114687,7 @@ class HelpAndProfilePage {
|
|
|
114684
114687
|
this.verifyLogout = async () => {
|
|
114685
114688
|
if (shouldSkipSetupAndTeardown())
|
|
114686
114689
|
return;
|
|
114687
|
-
await test$1.step("1: Open Help center
|
|
114690
|
+
await test$1.step("1: Open Help center", this.openHelpCenter);
|
|
114688
114691
|
await test$1.step("2: Click logout and verify", async () => {
|
|
114689
114692
|
await this.page
|
|
114690
114693
|
.getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
|
|
@@ -114766,6 +114769,7 @@ class HelpAndProfilePage {
|
|
|
114766
114769
|
this.openAndVerifyStatus = async (appName) => {
|
|
114767
114770
|
await test$1.step("1: Open Help Center links", this.openHelpCenter);
|
|
114768
114771
|
await test$1.step("2: Open and verify status page", async () => {
|
|
114772
|
+
await this.page.getByTestId(HELP_CENTER_SELECTORS.helpMenuBtn).click();
|
|
114769
114773
|
const statusPagePromise = this.page.waitForEvent("popup");
|
|
114770
114774
|
await this.page.getByTestId(HELP_CENTER_SELECTORS.statusButton).click();
|
|
114771
114775
|
const statusPage = await statusPagePromise;
|
|
@@ -114779,6 +114783,7 @@ class HelpAndProfilePage {
|
|
|
114779
114783
|
this.openAndVerifyCommunity = async () => {
|
|
114780
114784
|
await test$1.step("1: Open Help Center links", this.openHelpCenter);
|
|
114781
114785
|
await test$1.step("2: Open and verify community", async () => {
|
|
114786
|
+
await this.page.getByTestId(HELP_CENTER_SELECTORS.helpMenuBtn).click();
|
|
114782
114787
|
const communityPagePromise = this.page.waitForEvent("popup");
|
|
114783
114788
|
await this.page
|
|
114784
114789
|
.getByTestId(HELP_CENTER_SELECTORS.communityButton)
|
|
@@ -116890,11 +116895,17 @@ class GooglePage extends IntegrationBase {
|
|
|
116890
116895
|
totpToken = this.totp.generate({ timestamp: Date.now() });
|
|
116891
116896
|
}
|
|
116892
116897
|
previousToken = totpToken;
|
|
116898
|
+
if (await codeInput.isHidden())
|
|
116899
|
+
return;
|
|
116893
116900
|
await codeInput.fill(totpToken);
|
|
116894
116901
|
expect(this.totp.validate({ token: totpToken })).not.toBeNull();
|
|
116895
116902
|
await this.page.locator(GOOGLE_LOGIN_SELECTORS.totpNext).click();
|
|
116896
|
-
await
|
|
116897
|
-
|
|
116903
|
+
await Promise.all([
|
|
116904
|
+
expect(codeInput).toBeHidden({ timeout: 20000 }),
|
|
116905
|
+
expect(this.page.getByText(GOOGLE_LOGIN_TEXTS.wrongCode)).toBeHidden({
|
|
116906
|
+
timeout: 20000,
|
|
116907
|
+
}),
|
|
116908
|
+
]);
|
|
116898
116909
|
}).toPass({ timeout: 2 * 60 * 1000 });
|
|
116899
116910
|
};
|
|
116900
116911
|
this.logoutFromGoogle = async () => {
|
|
@@ -117091,32 +117102,58 @@ class SlackPage extends IntegrationBase {
|
|
|
117091
117102
|
await slackWebappPage.addLocatorHandler(slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.messagePaneBannerCloseIcon), locator => locator.click(), { times: 1 });
|
|
117092
117103
|
await slackWebappPage.addLocatorHandler(slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.permissionBannerCloseIcon), locator => locator.click(), { noWaitAfter: true, times: 2 });
|
|
117093
117104
|
};
|
|
117094
|
-
this.
|
|
117105
|
+
this.initializeSlackPermissionPage = async () => {
|
|
117095
117106
|
await this.connect();
|
|
117096
|
-
const loginButton = this.page.getByRole("button", {
|
|
117097
|
-
name: this.t("neetoSlack.slack.connect.loginButton"),
|
|
117098
|
-
});
|
|
117099
|
-
const installButton = this.page.locator(SLACK_SELECTORS.installButton);
|
|
117100
|
-
const allowButton = this.page.getByRole("button", {
|
|
117101
|
-
name: SLACK_WEB_TEXTS.allow,
|
|
117102
|
-
});
|
|
117103
|
-
const button = installButton.or(allowButton);
|
|
117104
|
-
if (await loginButton.isVisible()) {
|
|
117105
|
-
await loginButton.click({ delay: 5000 });
|
|
117106
|
-
await this.page.waitForURL(RegExp("(.*)slack.com/.*"));
|
|
117107
|
-
}
|
|
117108
117107
|
await this.page.waitForLoadState("domcontentloaded", { timeout: 25000 });
|
|
117109
|
-
await expect(
|
|
117110
|
-
await expect(
|
|
117111
|
-
|
|
117108
|
+
await expect(this.allowButton).toBeVisible({ timeout: 25000 });
|
|
117109
|
+
await expect(this.allowButton).toBeEnabled({ timeout: 25000 });
|
|
117110
|
+
return await this.page
|
|
117112
117111
|
.locator(SLACK_SELECTORS.teamPicketButtonContent)
|
|
117113
|
-
.textContent()
|
|
117114
|
-
|
|
117115
|
-
|
|
117112
|
+
.textContent();
|
|
117113
|
+
};
|
|
117114
|
+
this.navigateToCallbackUrl = async () => {
|
|
117115
|
+
await this.page.goto(this.callbackUrl.replace(/^https:/, "http:"));
|
|
117116
|
+
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
117117
|
+
};
|
|
117118
|
+
this.captureCallbackUrl = () => this.page.on("request", (request) => {
|
|
117119
|
+
const url = request.url();
|
|
117120
|
+
if (url.includes("/neeto_slack/api/v2/slack/callbacks") &&
|
|
117121
|
+
url.startsWith("https:")) {
|
|
117122
|
+
this.callbackUrl = url;
|
|
117123
|
+
}
|
|
117124
|
+
});
|
|
117125
|
+
this.connectAndVerifyInDev = async (redirectUrl, channelToConfigure, customSteps) => {
|
|
117126
|
+
this.currentWorkspace = (await this.initializeSlackPermissionPage()) || "";
|
|
117127
|
+
this.captureCallbackUrl();
|
|
117128
|
+
await this.allowButton.click({ timeout: 25000 });
|
|
117129
|
+
await expect(this.allowButton).toBeHidden({ timeout: 25000 });
|
|
117130
|
+
await this.page.waitForLoadState("domcontentloaded", { timeout: 20000 });
|
|
117131
|
+
await this.navigateToCallbackUrl();
|
|
117132
|
+
await this.page.waitForURL(redirectUrl, {
|
|
117133
|
+
timeout: 15000,
|
|
117134
|
+
});
|
|
117135
|
+
await this.completeSlackChannelSetup(channelToConfigure, customSteps);
|
|
117136
|
+
};
|
|
117137
|
+
this.connectAndVerifyInStaging = async (redirectUrl, channelToConfigure, customSteps) => {
|
|
117138
|
+
this.currentWorkspace = (await this.initializeSlackPermissionPage()) || "";
|
|
117139
|
+
await this.allowButton.click({ timeout: 25000 });
|
|
117140
|
+
await expect(this.allowButton).toBeHidden({ timeout: 25000 });
|
|
117141
|
+
await this.page.waitForLoadState("domcontentloaded", { timeout: 20000 });
|
|
117142
|
+
await this.page.waitForURL(redirectUrl, {
|
|
117143
|
+
timeout: 15000,
|
|
117144
|
+
});
|
|
117145
|
+
await this.completeSlackChannelSetup(channelToConfigure, customSteps);
|
|
117146
|
+
};
|
|
117147
|
+
this.connectAndVerifyIntegration = async (redirectUrl, customSteps, channelToConfigure = SLACK_DEFAULT_CHANNEL) => {
|
|
117148
|
+
IS_DEV_ENV
|
|
117149
|
+
? await this.connectAndVerifyInDev(redirectUrl, channelToConfigure, customSteps)
|
|
117150
|
+
: await this.connectAndVerifyInStaging(redirectUrl, channelToConfigure, customSteps);
|
|
117151
|
+
};
|
|
117152
|
+
this.completeSlackChannelSetup = async (channelToConfigure, customSteps) => {
|
|
117116
117153
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
117117
117154
|
await expect(this.page.getByRole("heading", {
|
|
117118
117155
|
name: this.t("neetoSlack.slack.configure.title", {
|
|
117119
|
-
teamName: currentWorkspace,
|
|
117156
|
+
teamName: this.currentWorkspace,
|
|
117120
117157
|
}),
|
|
117121
117158
|
})).toBeVisible({ timeout: 10000 });
|
|
117122
117159
|
await this.neetoPlaywrightUtilities.selectOptionFromDropdown({
|
|
@@ -117125,14 +117162,17 @@ class SlackPage extends IntegrationBase {
|
|
|
117125
117162
|
await this.page
|
|
117126
117163
|
.getByRole("button", { name: this.t("neetoSlack.common.continue") })
|
|
117127
117164
|
.click();
|
|
117128
|
-
await
|
|
117165
|
+
await Promise.all([
|
|
117166
|
+
this.neetoPlaywrightUtilities.waitForPageLoad(),
|
|
117167
|
+
this.neetoPlaywrightUtilities.verifyToast(),
|
|
117168
|
+
]);
|
|
117129
117169
|
if (customSteps) {
|
|
117130
117170
|
await customSteps();
|
|
117131
117171
|
}
|
|
117132
117172
|
else {
|
|
117133
117173
|
await expect(this.page.getByRole("heading", {
|
|
117134
117174
|
name: this.t("neetoSlack.slack.finish.title", {
|
|
117135
|
-
teamName: currentWorkspace,
|
|
117175
|
+
teamName: this.currentWorkspace,
|
|
117136
117176
|
}),
|
|
117137
117177
|
})).toBeVisible();
|
|
117138
117178
|
await this.page
|
|
@@ -117259,6 +117299,9 @@ class SlackPage extends IntegrationBase {
|
|
|
117259
117299
|
.click();
|
|
117260
117300
|
await expect(channelItem).toBeHidden();
|
|
117261
117301
|
};
|
|
117302
|
+
this.allowButton = this.page.getByRole("button", {
|
|
117303
|
+
name: SLACK_WEB_TEXTS.allow,
|
|
117304
|
+
});
|
|
117262
117305
|
}
|
|
117263
117306
|
}
|
|
117264
117307
|
|
|
@@ -119227,36 +119270,45 @@ class OrganizationPage {
|
|
|
119227
119270
|
}
|
|
119228
119271
|
}
|
|
119229
119272
|
|
|
119273
|
+
dayjs.extend(customParseFormat);
|
|
119230
119274
|
class ApiKeysPage {
|
|
119231
119275
|
constructor(page, neetoPlaywrightUtilities) {
|
|
119276
|
+
this.page = page;
|
|
119277
|
+
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
119278
|
+
this.enableExpiryDate = async (expiryDate) => {
|
|
119279
|
+
const userProps = await getGlobalUserProps(this.page);
|
|
119280
|
+
const normalizedDate = dayjs(expiryDate, DATE_FORMATS.date);
|
|
119281
|
+
const formattedExpiryDate = normalizedDate.format(userProps === null || userProps === void 0 ? void 0 : userProps.dateFormat);
|
|
119282
|
+
const expiryDateInput = this.page
|
|
119283
|
+
.getByTestId(COMMON_SELECTORS.paneBody)
|
|
119284
|
+
.getByTestId(ADMIN_PANEL_SELECTORS.expiryDateInput);
|
|
119285
|
+
const nextYearBtn = this.page.getByLabel(DATE_TEXTS.nextYear, {
|
|
119286
|
+
exact: true,
|
|
119287
|
+
});
|
|
119288
|
+
await this.page
|
|
119289
|
+
.getByTestId(COMMON_SELECTORS.checkboxInput("never-expires"))
|
|
119290
|
+
.uncheck();
|
|
119291
|
+
await expiryDateInput.click();
|
|
119292
|
+
await expect(nextYearBtn).toBeVisible();
|
|
119293
|
+
await expiryDateInput.pressSequentially(formattedExpiryDate, {
|
|
119294
|
+
delay: 250,
|
|
119295
|
+
});
|
|
119296
|
+
await Promise.all([
|
|
119297
|
+
expect(expiryDateInput).toHaveValue(formattedExpiryDate),
|
|
119298
|
+
expect(this.page.getByRole("button", { name: CALENDAR_LABELS.month })).toHaveText(normalizedDate.format(DATE_FORMATS.month)),
|
|
119299
|
+
expect(this.page.getByRole("button", { name: CALENDAR_LABELS.year })).toHaveText(normalizedDate.format(DATE_FORMATS.year)),
|
|
119300
|
+
expect(this.page.getByTitle(normalizedDate.format(DATE_FORMATS.calendarDate))).toHaveClass(RegExp(DATE_PICKER_SELECTORS.selectedDateInCalendarClass)),
|
|
119301
|
+
]);
|
|
119302
|
+
await this.page.keyboard.press("Enter");
|
|
119303
|
+
await expect(nextYearBtn).toBeHidden();
|
|
119304
|
+
};
|
|
119232
119305
|
this.fillApiKeyDetails = async ({ label, expiryDate }) => {
|
|
119233
119306
|
await this.page
|
|
119234
119307
|
.getByTestId(COMMON_SELECTORS.paneBody)
|
|
119235
119308
|
.getByTestId(COMMON_SELECTORS.customInputField("label"))
|
|
119236
119309
|
.fill(label);
|
|
119237
|
-
|
|
119238
|
-
|
|
119239
|
-
.getByTestId(COMMON_SELECTORS.checkboxInput("never-expires"))
|
|
119240
|
-
.uncheck();
|
|
119241
|
-
const expiryDateInput = this.page
|
|
119242
|
-
.getByTestId(COMMON_SELECTORS.paneBody)
|
|
119243
|
-
.getByTestId(ADMIN_PANEL_SELECTORS.expiryDateInput);
|
|
119244
|
-
await expiryDateInput.click();
|
|
119245
|
-
await expect(this.page.getByLabel(DATE_TEXTS.nextYear, { exact: true })).toBeVisible();
|
|
119246
|
-
await expiryDateInput.pressSequentially(expiryDate, { delay: 250 });
|
|
119247
|
-
dayjs.extend(customParseFormat);
|
|
119248
|
-
const parsedExpiryDate = dayjs(expiryDate, DATE_FORMATS.date);
|
|
119249
|
-
await Promise.all([
|
|
119250
|
-
expect(expiryDateInput).toHaveValue(expiryDate),
|
|
119251
|
-
expect(this.page.getByRole("button", { name: CALENDAR_LABELS.month })).toHaveText(parsedExpiryDate.format(DATE_FORMATS.month)),
|
|
119252
|
-
expect(this.page.getByRole("button", { name: CALENDAR_LABELS.year })).toHaveText(parsedExpiryDate.format(DATE_FORMATS.year)),
|
|
119253
|
-
expect(this.page.getByTitle(parsedExpiryDate.format(DATE_FORMATS.calendarDate))).toHaveClass(RegExp(DATE_PICKER_SELECTORS.selectedDateInCalendarClass)),
|
|
119254
|
-
]);
|
|
119255
|
-
await this.page.keyboard.press("Enter");
|
|
119256
|
-
await expect(this.page.getByLabel(DATE_TEXTS.nextYear, { exact: true })).toBeHidden();
|
|
119257
|
-
}
|
|
119258
|
-
await this.page.getByTestId(COMMON_SELECTORS.saveChangesButton).click();
|
|
119259
|
-
await this.neetoPlaywrightUtilities.verifyToast();
|
|
119310
|
+
isPresent(expiryDate) && (await this.enableExpiryDate(expiryDate));
|
|
119311
|
+
await this.neetoPlaywrightUtilities.saveChanges({ isPane: true });
|
|
119260
119312
|
};
|
|
119261
119313
|
this.verifyApiKey = ({ targetRow, label, date }) => Promise.all([
|
|
119262
119314
|
expect(targetRow.getByRole("cell", { name: label })).toBeVisible(),
|
|
@@ -119285,8 +119337,6 @@ class ApiKeysPage {
|
|
|
119285
119337
|
await this.neetoPlaywrightUtilities.verifyToast();
|
|
119286
119338
|
await expect(targetRow).toBeHidden();
|
|
119287
119339
|
};
|
|
119288
|
-
this.page = page;
|
|
119289
|
-
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
119290
119340
|
this.t = getI18nInstance().t;
|
|
119291
119341
|
}
|
|
119292
119342
|
}
|
|
@@ -119384,7 +119434,9 @@ class CustomDomainPage {
|
|
|
119384
119434
|
]);
|
|
119385
119435
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
119386
119436
|
await validateButton.click();
|
|
119387
|
-
await expect
|
|
119437
|
+
await expect
|
|
119438
|
+
.soft(this.page.getByTestId(COMMON_SELECTORS.calloutElement))
|
|
119439
|
+
.toBeVisible({ timeout: 15000 });
|
|
119388
119440
|
let isCertificateLimitExceeded = false;
|
|
119389
119441
|
await expect(async () => {
|
|
119390
119442
|
isCertificateLimitExceeded = await this.isCertificateLimitExceeded();
|
|
@@ -119903,6 +119955,11 @@ const TEAM_MEMBER_TEXTS = {
|
|
|
119903
119955
|
emailSubject: "Your team members export is here",
|
|
119904
119956
|
};
|
|
119905
119957
|
|
|
119958
|
+
const KEYBOARD_SHORTCUT_TEST_CASES = [
|
|
119959
|
+
{ os: "windows", agent: USER_AGENTS.windows },
|
|
119960
|
+
{ os: "mac", agent: USER_AGENTS.mac },
|
|
119961
|
+
];
|
|
119962
|
+
|
|
119906
119963
|
const PHONE_NUMBER_FORMATS = [
|
|
119907
119964
|
{ name: "Afghanistan", code: "+93", format: "70#######", flag: "🇦🇫" },
|
|
119908
119965
|
{ name: "Aland", code: "+358", format: "5####", flag: "🇦🇽" },
|
|
@@ -125328,5 +125385,5 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
125328
125385
|
});
|
|
125329
125386
|
};
|
|
125330
125387
|
|
|
125331
|
-
export { ACTIONS, ADMIN_PANEL_SELECTORS, API_KEYS_SELECTORS, API_ROUTES, AUDIT_LOGS_SELECTORS, AdminPanelPage, ApiKeysApi, ApiKeysPage, AuditLogsPage, BASE_URL, CALENDAR_LABELS, CERTIFICATE_LIMIT_EXCEEDED_MESSAGE, CERTIFICATE_LIMIT_EXCEEDED_REGEXP, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COLOR, COMMON_SELECTORS, COMMON_TEXTS, COMMUNITY_TEXTS, CREDENTIALS, CURRENT_TIME_RANGES, CUSTOM_DOMAIN_SELECTORS, CUSTOM_DOMAIN_SUFFIX, CustomCommands, CustomDomainApi, CustomDomainPage, DATE_FORMATS, DATE_PICKER_SELECTORS, DATE_RANGES, DATE_TEXTS, DEFAULT_WEBHOOKS_RESPONSE_TEXT, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, EMPTY_STORAGE_STATE, ENGAGE_TEXTS, ENVIRONMENT, EXAMPLE_URL, EXPANDED_FONT_SIZE, EXPORT_FILE_TYPES, EditorPage, EmbedBase, FILE_FORMATS, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_ANALYTICS_SELECTORS, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GOOGLE_SHEETS_SELECTORS, GooglePage, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IPRestrictionsPage, IP_RESTRICTIONS_SELECTORS, IS_DEV_ENV, IS_STAGING_ENV, ImageUploader, IntegrationBase, IpRestrictionsApi, KEYBOARD_SHORTCUTS_SELECTORS, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MICROSOFT_LOGIN_SELECTORS, MICROSOFT_LOGIN_TEXTS, MailerUtils, Member, MemberApis, MicrosoftPage, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_SEO_SELECTORS, NEETO_TEXT_MODIFIER_SELECTORS, NeetoTowerApi, ONBOARDING_SELECTORS, ORGANIZATION_TEXTS, OTP_EMAIL_PATTERN, OrganizationPage, PAST_TIME_RANGES, PHONE_NUMBER_FORMATS, PLURAL, PROFILE_LINKS, PROFILE_SECTION_SELECTORS, PROJECT_NAMES, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, RailsEmailRakeClient, RailsEmailUtils, RoleApis, RolesPage, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STATUS_TEXTS, STORAGE_STATE, SecurityApi, SidebarSection, SlackApi, SlackPage, TABLE_SELECTORS, TAB_SELECTORS, TAGS_SELECTORS, TEAM_MEMBER_TEXTS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THANK_YOU_SELECTORS, THEMES_SELECTORS, THEMES_TEXTS, THIRD_PARTY_ROUTES, TIME_RANGES, TOASTR_MESSAGES, TWILIO_SELECTORS, TagsApi, TagsPage, TeamMembers, ThankYouApi, ThankYouPage, TwilioApi, USER_AGENTS, WEBHOOK_SELECTORS, WebhookSiteApi, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, baseURLGenerator, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, createOrganizationViaRake, currencyUtils, dataQa, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, fillCredentialsAndSubmit, filterUtils, generatePhoneNumber, generatePhoneNumberDetails, generateRandomBypassEmail, generateRandomFile, generateStagingData, getByDataQA, getClipboardContent, getFormattedPhoneNumber, getFullUrl, getGlobalUserProps, getGlobalUserState, getImagePathAndName, getIsoCodeFromPhoneCode, getListCount, globalShortcuts, grantClipboardPermissions, headerUtils, hexToRGB, hexToRGBA, hyphenize, i18nFixture, initializeCredentials, initializeTestData, initializeTotp, isGithubIssueOpen, joinHyphenCase, joinString, login, loginWithoutSSO, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, serializeFileForBrowser, shouldSkipCustomDomainSetup, shouldSkipSetupAndTeardown, simulateClickWithDelay, simulateTypingWithDelay, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
|
|
125388
|
+
export { ACTIONS, ADMIN_PANEL_SELECTORS, API_KEYS_SELECTORS, API_ROUTES, AUDIT_LOGS_SELECTORS, AdminPanelPage, ApiKeysApi, ApiKeysPage, AuditLogsPage, BASE_URL, CALENDAR_LABELS, CERTIFICATE_LIMIT_EXCEEDED_MESSAGE, CERTIFICATE_LIMIT_EXCEEDED_REGEXP, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COLOR, COMMON_SELECTORS, COMMON_TEXTS, COMMUNITY_TEXTS, CREDENTIALS, CURRENT_TIME_RANGES, CUSTOM_DOMAIN_SELECTORS, CUSTOM_DOMAIN_SUFFIX, CustomCommands, CustomDomainApi, CustomDomainPage, DATE_FORMATS, DATE_PICKER_SELECTORS, DATE_RANGES, DATE_TEXTS, DEFAULT_WEBHOOKS_RESPONSE_TEXT, DESCRIPTION_EDITOR_TEXTS, EMBED_SELECTORS, EMOJI_LABEL, EMPTY_STORAGE_STATE, ENGAGE_TEXTS, ENVIRONMENT, EXAMPLE_URL, EXPANDED_FONT_SIZE, EXPORT_FILE_TYPES, EditorPage, EmbedBase, FILE_FORMATS, FONT_SIZE_SELECTORS, GLOBAL_TRANSLATIONS_PATTERN, GOOGLE_ANALYTICS_SELECTORS, GOOGLE_CALENDAR_DATE_FORMAT, GOOGLE_LOGIN_SELECTORS, GOOGLE_LOGIN_TEXTS, GOOGLE_SHEETS_SELECTORS, GooglePage, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IPRestrictionsPage, IP_RESTRICTIONS_SELECTORS, IS_DEV_ENV, IS_STAGING_ENV, ImageUploader, IntegrationBase, IpRestrictionsApi, KEYBOARD_SHORTCUTS_SELECTORS, KEYBOARD_SHORTCUT_TEST_CASES, LIST_MODIFIER_SELECTORS, LIST_MODIFIER_TAGS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MICROSOFT_LOGIN_SELECTORS, MICROSOFT_LOGIN_TEXTS, MailerUtils, Member, MemberApis, MicrosoftPage, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, NEETO_IMAGE_UPLOADER_SELECTORS, NEETO_ROUTES, NEETO_SEO_SELECTORS, NEETO_TEXT_MODIFIER_SELECTORS, NeetoTowerApi, ONBOARDING_SELECTORS, ORGANIZATION_TEXTS, OTP_EMAIL_PATTERN, OrganizationPage, PAST_TIME_RANGES, PHONE_NUMBER_FORMATS, PLURAL, PROFILE_LINKS, PROFILE_SECTION_SELECTORS, PROJECT_NAMES, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, RailsEmailRakeClient, RailsEmailUtils, RoleApis, RolesPage, SIGNUP_SELECTORS, SINGULAR, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STATUS_TEXTS, STORAGE_STATE, SecurityApi, SidebarSection, SlackApi, SlackPage, TABLE_SELECTORS, TAB_SELECTORS, TAGS_SELECTORS, TEAM_MEMBER_TEXTS, TEXT_MODIFIER_ROLES, TEXT_MODIFIER_SELECTORS, TEXT_MODIFIER_TAGS, THANK_YOU_SELECTORS, THEMES_SELECTORS, THEMES_TEXTS, THIRD_PARTY_ROUTES, TIME_RANGES, TOASTR_MESSAGES, TWILIO_SELECTORS, TagsApi, TagsPage, TeamMembers, ThankYouApi, ThankYouPage, TwilioApi, USER_AGENTS, WEBHOOK_SELECTORS, WebhookSiteApi, WebhooksPage, ZAPIER_LIMIT_EXHAUSTED_MESSAGE, ZAPIER_SELECTORS, ZAPIER_TEST_EMAIL, ZAPIER_WEB_TEXTS, ZapierPage, baseURLGenerator, basicHTMLContent, clearCredentials, commands, cpuThrottlingUsingCDP, createOrganizationViaRake, currencyUtils, dataQa, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, fillCredentialsAndSubmit, filterUtils, generatePhoneNumber, generatePhoneNumberDetails, generateRandomBypassEmail, generateRandomFile, generateStagingData, getByDataQA, getClipboardContent, getFormattedPhoneNumber, getFullUrl, getGlobalUserProps, getGlobalUserState, getImagePathAndName, getIsoCodeFromPhoneCode, getListCount, globalShortcuts, grantClipboardPermissions, headerUtils, hexToRGB, hexToRGBA, hyphenize, i18nFixture, initializeCredentials, initializeTestData, initializeTotp, isGithubIssueOpen, joinHyphenCase, joinString, login, loginWithoutSSO, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, serializeFileForBrowser, shouldSkipCustomDomainSetup, shouldSkipSetupAndTeardown, simulateClickWithDelay, simulateTypingWithDelay, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
|
|
125332
125389
|
//# sourceMappingURL=index.js.map
|