@bigbinary/neeto-playwright-commons 1.8.39 → 1.8.41

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.d.ts CHANGED
@@ -5,6 +5,7 @@ import MailosaurClient from 'mailosaur';
5
5
  import { I18nPlaywrightFixture } from 'playwright-i18next-fixture';
6
6
  import { TFunction } from 'i18next';
7
7
  import { Protocol } from 'playwright-core/types/protocol';
8
+ import * as ts_toolbelt_out_Function_Curry from 'ts-toolbelt/out/Function/Curry';
8
9
  import * as playwright_core from 'playwright-core';
9
10
  import { Secret, TOTP } from 'otpauth';
10
11
 
@@ -230,7 +231,7 @@ declare class HelpAndProfilePage {
230
231
 
231
232
  type Integration = "dailyco" | "github" | "google-calendar" | "google-analytics" | "google-sheets" | "microsoft-teams" | "neeto-chat" | "neeto-crm" | "slack" | "twilio" | "whereby" | "zapier" | "zoom";
232
233
  type IntegrationStatus = "connected" | "disconnected";
233
- type PartialInterceptMultipleResponsesParams = Partial<InterceptMultipleResponsesParams>;
234
+ type PartialInterceptMultipleResponsesParams$1 = Partial<InterceptMultipleResponsesParams>;
234
235
  interface IntegrationBaseParams {
235
236
  page: Page;
236
237
  neetoPlaywrightUtilities: CustomCommands;
@@ -239,7 +240,7 @@ interface IntegrationBaseParams {
239
240
  connectHeader?: string;
240
241
  pageloaderTimeout?: number;
241
242
  integrationRouteIndex?: string;
242
- integrationRouteResponsesParams?: PartialInterceptMultipleResponsesParams;
243
+ integrationRouteResponsesParams?: PartialInterceptMultipleResponsesParams$1;
243
244
  }
244
245
  declare class IntegrationBase {
245
246
  readonly page: Page;
@@ -251,17 +252,24 @@ declare class IntegrationBase {
251
252
  readonly connectedHeader: string;
252
253
  pageloaderTimeout: number;
253
254
  integrationRouteIndex: string;
254
- integrationRouteResponsesParams: PartialInterceptMultipleResponsesParams;
255
+ integrationRouteResponsesParams: PartialInterceptMultipleResponsesParams$1;
255
256
  constructor({ page, neetoPlaywrightUtilities, integration, connectHeader, connectedHeader, pageloaderTimeout, integrationRouteIndex, integrationRouteResponsesParams, }: IntegrationBaseParams);
256
- disconnect: (interceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams) => Promise<void>;
257
+ disconnect: (interceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams$1) => Promise<void>;
257
258
  connect: (skipGoTo?: boolean) => Promise<void>;
258
259
  verifyIntegrationStatus: (status?: IntegrationStatus) => Promise<void>;
259
260
  clickOnIntegrationCard: () => Promise<void>;
260
- private gotoIntegrationIndex;
261
+ gotoIntegrationIndex: () => Promise<void>;
261
262
  }
262
263
 
263
264
  type AsyncNoArgsFunction = () => Promise<void>;
264
265
  type RedirectUrl = string | RegExp | ((url: URL) => boolean);
266
+ type PartialInterceptMultipleResponsesParams = Partial<InterceptMultipleResponsesParams>;
267
+ type UpdateConfigureSlackChannelParams = {
268
+ newSlackChannel: string;
269
+ interceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams;
270
+ refreshInterceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams;
271
+ refreshChannelList?: boolean;
272
+ };
265
273
  type SlackPageParams = {
266
274
  page: Page;
267
275
  neetoPlaywrightUtilities: CustomCommands;
@@ -269,16 +277,20 @@ type SlackPageParams = {
269
277
  };
270
278
  declare class SlackPage extends IntegrationBase {
271
279
  slackWebappPage: Page;
280
+ slackWebappPageDataQa: (dataQa: string | [string, string]) => Locator;
272
281
  constructor({ page, neetoPlaywrightUtilities, integrationRouteIndex, }: SlackPageParams);
273
- connectAndVerifyIntegration: (redirectUrl: RedirectUrl, customSteps?: AsyncNoArgsFunction) => Promise<void>;
282
+ connectAndVerifyIntegration: (redirectUrl: RedirectUrl, customSteps?: AsyncNoArgsFunction, channelToConfigure?: string) => Promise<void>;
274
283
  disconnectAndVerifyIntegration: () => Promise<void>;
275
- updateConfigureSlackChannel: ({ newSlackChannel, interceptMultipleResponsesParams, }: {
276
- newSlackChannel: string;
277
- interceptMultipleResponsesParams?: Partial<InterceptMultipleResponsesParams> | undefined;
278
- }) => Promise<void>;
279
- loginToSlackWebapp: (slackWebappPage: Page) => Promise<void>;
284
+ updateConfigureSlackChannel: ({ newSlackChannel, interceptMultipleResponsesParams, refreshInterceptMultipleResponsesParams, refreshChannelList, }: UpdateConfigureSlackChannelParams) => Promise<void>;
285
+ clickOnChannelListRefreshButton: (refreshInterceptMultipleResponsesParams?: PartialInterceptMultipleResponsesParams) => Promise<void>;
286
+ loginToSlackWebapp: (slackWebappPage: Page, customCredentials?: Record<"workspace" | "loginPassword" | "loginEmail", string | undefined>) => Promise<void>;
280
287
  logoutFromSlackWebApp: () => Promise<void>;
281
288
  goToSlackChannel: (slackChannel: string) => Promise<void>;
289
+ createNewSlackChannel: ({ channelName, kind, }: {
290
+ channelName: string;
291
+ kind?: "public" | "private" | undefined;
292
+ }) => Promise<void>;
293
+ deleteSlackChannel: (channel: string) => Promise<void>;
282
294
  }
283
295
 
284
296
  interface WebhooksPageParams {
@@ -336,6 +348,15 @@ declare class OrganizationPage {
336
348
  updateSubdomainIfExists: (appName: string) => Promise<void>;
337
349
  }
338
350
 
351
+ declare class SidebarSection {
352
+ page: Page;
353
+ neetoPlaywrightUtilities: CustomCommands;
354
+ t: TFunction;
355
+ constructor(page: Page, neetoPlaywrightUtilities: CustomCommands);
356
+ clickOnSubLink: (label: string) => Promise<void>;
357
+ clickOnGoBackButton: (label: string) => Promise<void>;
358
+ }
359
+
339
360
  declare const ENVIRONMENT: {
340
361
  development: string;
341
362
  staging: string;
@@ -463,6 +484,8 @@ declare const COMMON_SELECTORS: {
463
484
  columnsDropdownButton: string;
464
485
  breadcrumbHeader: string;
465
486
  header: string;
487
+ sidebarSubLink: (label: string) => string;
488
+ sidebarGoBackButton: (label: string) => string;
466
489
  };
467
490
 
468
491
  declare const NEETO_EDITOR_SELECTORS: {
@@ -667,6 +690,21 @@ declare const SLACK_SELECTORS: {
667
690
  replyBar: string;
668
691
  markdownElement: string;
669
692
  virtualListItem: string;
693
+ channelItems: string;
694
+ };
695
+ declare const SLACK_DATA_QA_SELECTORS: {
696
+ sectionHeadingButton: string;
697
+ channelSectionSubmenuCreate: string;
698
+ channelSectionMenuCreateChannel: string;
699
+ skModalContent: string;
700
+ infiniteSpinner: string;
701
+ channelNameOptionsList: string;
702
+ channelNameInput: string;
703
+ createChannelNextButton: string;
704
+ inviteToWorkspaceSkipButton: string;
705
+ menuItems: string;
706
+ channelDetailsModal: string;
707
+ channelDetailsSettingsTab: string;
670
708
  };
671
709
 
672
710
  declare const INTEGRATION_SELECTORS: {
@@ -692,6 +730,10 @@ declare const SLACK_WEB_TEXTS: {
692
730
  signOut: string;
693
731
  allow: string;
694
732
  loadingThread: string;
733
+ name: string;
734
+ deleteThisChannel: string;
735
+ permanentlyDeleteTheChannel: string;
736
+ deleteChannel: string;
695
737
  };
696
738
 
697
739
  declare const initializeCredentials: (product: string) => void;
@@ -733,6 +775,7 @@ declare const skipTest: {
733
775
  declare const shouldSkipSetupAndTeardown: () => boolean | "";
734
776
  declare const squish: (text: string) => string;
735
777
  declare const toCamelCase: (string: string) => string;
778
+ declare const getByDataQA: ts_toolbelt_out_Function_Curry.Curry<(page: Page, dataQa: string | [string, string]) => playwright_core.Locator>;
736
779
 
737
780
  interface LoginProps {
738
781
  page: Page;
@@ -840,4 +883,4 @@ interface Overrides {
840
883
  }
841
884
  declare const definePlaywrightConfig: (overrides: Overrides) => _playwright_test.PlaywrightTestConfig<{}, {}>;
842
885
 
843
- export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, type CustomFixture, ENVIRONMENT, EmbedBase, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailosaurUtils, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, USER_AGENTS, WebhooksPage, clearCredentials, commands, cpuThrottlingUsingCDP, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, generateStagingData, getGlobalUserState, headerUtils, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, _default as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
886
+ export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, type CustomFixture, ENVIRONMENT, EmbedBase, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailosaurUtils, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, USER_AGENTS, WebhooksPage, clearCredentials, commands, cpuThrottlingUsingCDP, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, generateStagingData, getByDataQA, getGlobalUserState, headerUtils, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, _default as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
package/index.js CHANGED
@@ -2,7 +2,7 @@ import test$1, { expect, test as test$2, defineConfig, devices } from '@playwrig
2
2
  import { execSync } from 'child_process';
3
3
  import * as fs$d from 'fs';
4
4
  import fs__default, { writeFileSync as writeFileSync$1, unlinkSync, readFileSync } from 'fs';
5
- import { not, isEmpty as isEmpty$1, isNil, isNotNil, mergeDeepLeft, mergeAll } from 'ramda';
5
+ import { curry, not, isEmpty as isEmpty$1, isNil, isNotNil, mergeDeepLeft, mergeAll } from 'ramda';
6
6
  import require$$0$2 from 'util';
7
7
  import { faker } from '@faker-js/faker';
8
8
  import MailosaurClient from 'mailosaur';
@@ -126,6 +126,16 @@ const shouldSkipSetupAndTeardown = () => { var _a; return ((_a = getGlobalUserSt
126
126
  // trims and replaces multiple whitespace characters in a string with a single space
127
127
  const squish = (text) => text.trim().replace(/\s+/g, " ");
128
128
  const toCamelCase = (string) => string.toLowerCase().replace(/( \w)/g, letter => letter[1].toUpperCase());
129
+ const getByDataQA = curry((page, dataQa) => {
130
+ if (typeof dataQa === "string") {
131
+ // eslint-disable-next-line playwright/no-raw-locators
132
+ return page.locator(`[data-qa='${dataQa}']`);
133
+ }
134
+ // eslint-disable-next-line playwright/no-raw-locators
135
+ return page
136
+ .locator(`[data-qa='${dataQa[0]}']`)
137
+ .locator(`[data-qa='${dataQa[1]}']`);
138
+ });
129
139
 
130
140
  const COMMON_SELECTORS = {
131
141
  copyButton: "copy-button",
@@ -191,6 +201,8 @@ const COMMON_SELECTORS = {
191
201
  columnsDropdownButton: "columns-dropdown-button",
192
202
  breadcrumbHeader: "header-breadcrumb",
193
203
  header: "neeto-molecules-header",
204
+ sidebarSubLink: (label) => `${hyphenize(label)}-sub-link`,
205
+ sidebarGoBackButton: (label) => `${hyphenize(label)}-go-back-button`,
194
206
  };
195
207
 
196
208
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -12539,6 +12551,10 @@ const SLACK_WEB_TEXTS = {
12539
12551
  signOut: "Sign out",
12540
12552
  allow: "Allow",
12541
12553
  loadingThread: "Loading thread",
12554
+ name: "Name",
12555
+ deleteThisChannel: "Delete this channel",
12556
+ permanentlyDeleteTheChannel: "Yes, permanently delete the channel",
12557
+ deleteChannel: "Delete channel",
12542
12558
  };
12543
12559
 
12544
12560
  const HELP_CENTER_SELECTORS = {
@@ -12887,6 +12903,21 @@ const SLACK_SELECTORS = {
12887
12903
  replyBar: "[data-qa='reply_bar']",
12888
12904
  markdownElement: "[data-qa='bk_markdown_element']",
12889
12905
  virtualListItem: "[data-qa='virtual-list-item']",
12906
+ channelItems: '[role="treeitem"][data-qa="virtual-list-item"]',
12907
+ };
12908
+ const SLACK_DATA_QA_SELECTORS = {
12909
+ sectionHeadingButton: "section_heading_button__channels",
12910
+ channelSectionSubmenuCreate: "channel_section_submenu_create",
12911
+ channelSectionMenuCreateChannel: "channel_section_menu__create_channel",
12912
+ skModalContent: "sk-modal-content",
12913
+ infiniteSpinner: "infinite-spinner",
12914
+ channelNameOptionsList: "channel-name-options-list",
12915
+ channelNameInput: "channel-name-input",
12916
+ createChannelNextButton: "create-channel-next-button",
12917
+ inviteToWorkspaceSkipButton: "invite_to_workspace_skip_button",
12918
+ menuItems: "menu_items",
12919
+ channelDetailsModal: "channel_details_modal",
12920
+ channelDetailsSettingsTab: "channel_details_settings_tab",
12890
12921
  };
12891
12922
 
12892
12923
  /* eslint-disable playwright/no-raw-locators */
@@ -12898,7 +12929,7 @@ class SlackPage extends IntegrationBase {
12898
12929
  integration: "slack",
12899
12930
  integrationRouteIndex,
12900
12931
  });
12901
- this.connectAndVerifyIntegration = async (redirectUrl, customSteps) => {
12932
+ this.connectAndVerifyIntegration = async (redirectUrl, customSteps, channelToConfigure = SLACK_DEFAULT_CHANNEL) => {
12902
12933
  await this.connect();
12903
12934
  await this.page
12904
12935
  .getByRole("button", {
@@ -12921,7 +12952,11 @@ class SlackPage extends IntegrationBase {
12921
12952
  teamName: currentWorkspace,
12922
12953
  }),
12923
12954
  })).toBeVisible();
12924
- await expect(this.page.getByTestId(COMMON_SELECTORS.selectValueContainer)).toContainText(SLACK_DEFAULT_CHANNEL);
12955
+ await this.neetoPlaywrightUtilities.selectOptionFromDropdown({
12956
+ value: channelToConfigure,
12957
+ selectValueContainer: COMMON_SELECTORS.selectValueContainer,
12958
+ selectMenu: COMMON_SELECTORS.dropdownMenu,
12959
+ });
12925
12960
  await this.page
12926
12961
  .getByRole("button", { name: this.t("neetoSlack.common.continue") })
12927
12962
  .click();
@@ -12944,11 +12979,14 @@ class SlackPage extends IntegrationBase {
12944
12979
  await this.disconnect();
12945
12980
  await this.verifyIntegrationStatus("disconnected");
12946
12981
  };
12947
- this.updateConfigureSlackChannel = async ({ newSlackChannel = "random", interceptMultipleResponsesParams = {}, }) => {
12982
+ this.updateConfigureSlackChannel = async ({ newSlackChannel = "random", interceptMultipleResponsesParams = {}, refreshInterceptMultipleResponsesParams = {}, refreshChannelList = false, }) => {
12948
12983
  await this.page.getByTestId(INTEGRATION_SELECTORS.manageButton).click();
12949
12984
  await this.page
12950
12985
  .getByRole("button", { name: this.t("neetoSlack.common.edit") })
12951
12986
  .click();
12987
+ if (refreshChannelList) {
12988
+ await this.clickOnChannelListRefreshButton(refreshInterceptMultipleResponsesParams);
12989
+ }
12952
12990
  await this.page.getByTestId(COMMON_SELECTORS.selectContainer).click();
12953
12991
  await this.page
12954
12992
  .getByTestId(COMMON_SELECTORS.dropdownMenu)
@@ -12963,25 +13001,41 @@ class SlackPage extends IntegrationBase {
12963
13001
  .click();
12964
13002
  await savePromise;
12965
13003
  };
12966
- this.loginToSlackWebapp = async (slackWebappPage) => {
13004
+ this.clickOnChannelListRefreshButton = async (refreshInterceptMultipleResponsesParams) => {
13005
+ const refreshChannelPromise = this.neetoPlaywrightUtilities.interceptMultipleResponses({
13006
+ times: 0,
13007
+ ...refreshInterceptMultipleResponsesParams,
13008
+ });
13009
+ await this.page
13010
+ .getByRole("button", {
13011
+ name: this.t("neetoSlack.slack.channelListRefreshButton"),
13012
+ })
13013
+ .click();
13014
+ await refreshChannelPromise;
13015
+ };
13016
+ this.loginToSlackWebapp = async (slackWebappPage, customCredentials) => {
12967
13017
  this.slackWebappPage = slackWebappPage;
12968
- if (isNotNil(process.env.SLACK_WORKSPACE) &&
12969
- isNotNil(process.env.SLACK_LOGIN_PASSWORD) &&
12970
- isNotNil(process.env.SLACK_LOGIN_EMAIL)) {
12971
- await slackWebappPage.goto(THIRD_PARTY_ROUTES.slack.loginWithPassword(process.env.SLACK_WORKSPACE));
13018
+ this.slackWebappPageDataQa = getByDataQA(this.slackWebappPage);
13019
+ const slackWorkspace = (customCredentials === null || customCredentials === void 0 ? void 0 : customCredentials.workspace) || process.env.SLACK_WORKSPACE;
13020
+ const slackLoginPassword = (customCredentials === null || customCredentials === void 0 ? void 0 : customCredentials.loginPassword) || process.env.SLACK_LOGIN_PASSWORD;
13021
+ const slackLoginEmail = (customCredentials === null || customCredentials === void 0 ? void 0 : customCredentials.loginEmail) || process.env.SLACK_LOGIN_EMAIL;
13022
+ if (isNotNil(slackWorkspace) &&
13023
+ isNotNil(slackLoginPassword) &&
13024
+ isNotNil(slackLoginEmail)) {
13025
+ await slackWebappPage.goto(THIRD_PARTY_ROUTES.slack.loginWithPassword(slackWorkspace));
12972
13026
  await slackWebappPage
12973
13027
  .locator(SLACK_SELECTORS.loginEmail)
12974
- .pressSequentially(process.env.SLACK_LOGIN_EMAIL, { delay: 10 });
13028
+ .pressSequentially(slackLoginEmail, { delay: 10 });
12975
13029
  await slackWebappPage
12976
13030
  .locator(SLACK_SELECTORS.loginPassword)
12977
- .pressSequentially(process.env.SLACK_LOGIN_PASSWORD, { delay: 10 });
13031
+ .pressSequentially(slackLoginPassword, { delay: 10 });
12978
13032
  await slackWebappPage.locator(SLACK_SELECTORS.signInButton).click();
12979
13033
  await slackWebappPage
12980
13034
  .locator(SLACK_SELECTORS.redirectOpenInBrowser)
12981
13035
  .click();
12982
13036
  }
12983
13037
  else {
12984
- throw new Error("ENV variable SLACK_LOGIN_EMAIL or SLACK_LOGIN_PASSWORD or SLACK_WORKSPACE is not defined. Please add the API key to use this fixture.");
13038
+ throw new Error("ENV variable SLACK_LOGIN_EMAIL or SLACK_LOGIN_PASSWORD or SLACK_WORKSPACE is not defined.");
12985
13039
  }
12986
13040
  };
12987
13041
  this.logoutFromSlackWebApp = async () => {
@@ -13000,6 +13054,49 @@ class SlackPage extends IntegrationBase {
13000
13054
  .locator(SLACK_SELECTORS.virtualListItem, { hasText: slackChannel })
13001
13055
  .click();
13002
13056
  };
13057
+ this.createNewSlackChannel = async ({ channelName, kind = "public", }) => {
13058
+ await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.sectionHeadingButton).click();
13059
+ await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.channelSectionSubmenuCreate).click();
13060
+ await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.channelSectionMenuCreateChannel).click();
13061
+ await expect(this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.skModalContent)).toBeVisible();
13062
+ await expect(this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.infiniteSpinner)).toBeHidden();
13063
+ await expect(this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.channelNameOptionsList)).toBeHidden({ timeout: 5000 });
13064
+ await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.skModalContent)
13065
+ .getByText(SLACK_WEB_TEXTS.name, { exact: true })
13066
+ .click();
13067
+ await this.slackWebappPageDataQa([
13068
+ SLACK_DATA_QA_SELECTORS.skModalContent,
13069
+ SLACK_DATA_QA_SELECTORS.channelNameInput,
13070
+ ]).pressSequentially(channelName);
13071
+ await expect(this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.infiniteSpinner)).toBeHidden();
13072
+ await expect(this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.createChannelNextButton)).toBeEnabled();
13073
+ await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.createChannelNextButton).click();
13074
+ await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.skModalContent)
13075
+ .getByRole("radio", { name: kind })
13076
+ .check();
13077
+ await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.createChannelNextButton).click();
13078
+ await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.inviteToWorkspaceSkipButton).click();
13079
+ };
13080
+ this.deleteSlackChannel = async (channel) => {
13081
+ const channelItem = this.slackWebappPage.locator(SLACK_SELECTORS.channelItems, { hasText: channel });
13082
+ await channelItem.click({ button: "right" });
13083
+ await this.slackWebappPageDataQa([
13084
+ SLACK_DATA_QA_SELECTORS.menuItems,
13085
+ SLACK_DATA_QA_SELECTORS.channelDetailsModal,
13086
+ ]).click();
13087
+ await expect(this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.channelDetailsModal)).toBeVisible();
13088
+ await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.channelDetailsSettingsTab).click();
13089
+ await this.slackWebappPageDataQa(SLACK_DATA_QA_SELECTORS.skModalContent)
13090
+ .getByRole("button", { name: SLACK_WEB_TEXTS.deleteThisChannel })
13091
+ .click();
13092
+ await this.slackWebappPage
13093
+ .getByLabel(SLACK_WEB_TEXTS.permanentlyDeleteTheChannel)
13094
+ .check();
13095
+ await this.slackWebappPage
13096
+ .getByRole("button", { name: SLACK_WEB_TEXTS.deleteChannel })
13097
+ .click();
13098
+ await expect(channelItem).toBeHidden();
13099
+ };
13003
13100
  }
13004
13101
  }
13005
13102
 
@@ -13233,6 +13330,16 @@ class OrganizationPage {
13233
13330
  }
13234
13331
  }
13235
13332
 
13333
+ class SidebarSection {
13334
+ constructor(page, neetoPlaywrightUtilities) {
13335
+ this.clickOnSubLink = (label) => this.page.getByTestId(COMMON_SELECTORS.sidebarSubLink(label)).click();
13336
+ this.clickOnGoBackButton = (label) => this.page.getByTestId(COMMON_SELECTORS.sidebarGoBackButton(label)).click();
13337
+ this.page = page;
13338
+ this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
13339
+ this.t = getI18nInstance().t;
13340
+ }
13341
+ }
13342
+
13236
13343
  const USER_AGENTS = {
13237
13344
  windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
13238
13345
  mac: "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
@@ -147005,5 +147112,5 @@ const definePlaywrightConfig = (overrides) => {
147005
147112
  });
147006
147113
  };
147007
147114
 
147008
- export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, ENVIRONMENT, EmbedBase, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailosaurUtils, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, USER_AGENTS, WebhooksPage, clearCredentials, commands, cpuThrottlingUsingCDP, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, generateStagingData, getGlobalUserState, headerUtils, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
147115
+ export { API_ROUTES, BASE_URL, CHANGELOG_WIDGET_SELECTORS, CHAT_WIDGET_SELECTORS, CHAT_WIDGET_TEXTS, COMMON_SELECTORS, CREDENTIALS, CustomCommands, ENVIRONMENT, EmbedBase, GLOBAL_TRANSLATIONS_PATTERN, HELP_CENTER_SELECTORS, HelpAndProfilePage, INTEGRATIONS_TEXTS, INTEGRATION_SELECTORS, IS_STAGING_ENV, IntegrationBase, KEYBOARD_SHORTCUTS_SELECTORS, LOGIN_SELECTORS, MEMBER_FORM_SELECTORS, MEMBER_SELECTORS, MEMBER_TEXTS, MERGE_TAGS_SELECTORS, MailosaurUtils, NEETO_AUTH_BASE_URL, NEETO_EDITOR_SELECTORS, NEETO_FILTERS_SELECTORS, OTP_EMAIL_PATTERN, OrganizationPage, PROFILE_SECTION_SELECTORS, PROJECT_TRANSLATIONS_PATH, ROLES_SELECTORS, ROUTES, SIGNUP_SELECTORS, SLACK_DATA_QA_SELECTORS, SLACK_DEFAULT_CHANNEL, SLACK_SELECTORS, SLACK_WEB_TEXTS, STORAGE_STATE, SidebarSection, SlackPage, TAGS_SELECTORS, THIRD_PARTY_ROUTES, USER_AGENTS, WebhooksPage, clearCredentials, commands, cpuThrottlingUsingCDP, decodeQRCodeFromFile, definePlaywrightConfig, executeWithThrottledResources, extractSubdomainFromError, generateStagingData, getByDataQA, getGlobalUserState, headerUtils, hyphenize, i18nFixture, initializeCredentials, initializeTotp, joinHyphenCase, joinString, login, loginWithoutSSO, memberUtils, networkConditions, networkThrottlingUsingCDP, readFileSyncIfExists, removeCredentialFile, shouldSkipSetupAndTeardown, skipTest, squish, stealth as stealthTest, tableUtils, toCamelCase, updateCredentials, writeDataToFile };
147009
147116
  //# sourceMappingURL=index.js.map