@bigbinary/neeto-playwright-commons 1.10.5 → 1.10.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -12848,6 +12848,7 @@ class EmbedBase {
12848
12848
  const CHAT_WIDGET_TEXTS = {
12849
12849
  newConversation: "Ask a question",
12850
12850
  welcomeChatBubble: "Hi! I'm here to assist you with any questions you may have. What can I do for you?",
12851
+ preChatQuestions: "Please fill in the form to start chatting.",
12851
12852
  };
12852
12853
  const MEMBER_TEXTS = {
12853
12854
  agent: "Agent",
@@ -12930,6 +12931,7 @@ const CHAT_WIDGET_SELECTORS = {
12930
12931
  preChatSubmitButton: "neeto-chat-widget-pre-chat-submit-btn",
12931
12932
  chatBubble: "neeto-chat-widget-chat-message-bubble",
12932
12933
  closeChat: "neeto-chat-widget-close-btn",
12934
+ chatQuestionHeader: "chat-question-header",
12933
12935
  };
12934
12936
  const CHANGELOG_WIDGET_SELECTORS = {
12935
12937
  changelogWrapper: ".nc-widget__wrapper",
@@ -12988,6 +12990,14 @@ class HelpAndProfilePage {
12988
12990
  await test$1.expect(newConversationButton).toBeVisible({ timeout: 35000 }); // Adding additional toBeVisible to take advantage of the auto-retrying web-first assertion
12989
12991
  await newConversationButton.click();
12990
12992
  await test$1.expect(this.neetoChatSpinner).toBeHidden({ timeout: 35000 });
12993
+ (await this.neetoChatFrame
12994
+ .getByTestId(CHAT_WIDGET_SELECTORS.chatQuestionHeader)
12995
+ .getByText(CHAT_WIDGET_TEXTS.preChatQuestions)
12996
+ .isVisible()) &&
12997
+ (await this.neetoChatFrame
12998
+ .getByTestId(CHAT_WIDGET_SELECTORS.preChatSubmitButton)
12999
+ .click());
13000
+ await test$1.expect(this.neetoChatSpinner).toBeHidden({ timeout: 35000 });
12991
13001
  });
12992
13002
  await test$1.test.step("Step 4: Verify conversation window", async () => {
12993
13003
  await test$1.expect(this.neetoChatFrame.getByTestId(CHAT_WIDGET_SELECTORS.chatBubble)).toHaveText(CHAT_WIDGET_TEXTS.welcomeChatBubble);
@@ -14263,7 +14273,7 @@ const MEMBER_SELECTORS = {
14263
14273
  dropDownIcon: "ntm-members-table-row-dropdown-button",
14264
14274
  editButton: "ntm-edit-member-button",
14265
14275
  menuBarHeading: "ntm-members-menubar-heading",
14266
- activateOrDeactivateMember: "ntm-deactivate-member-button",
14276
+ removeMember: "ntm-deactivate-member-button",
14267
14277
  columnsButton: "columns-dropdown-button",
14268
14278
  columnsDropdownContainer: "columns-dropdown-container",
14269
14279
  emailDropdownItemLabel: "email-checkbox-label",
@@ -14289,12 +14299,8 @@ const MEMBER_FORM_SELECTORS = {
14289
14299
 
14290
14300
  class TeamMembers {
14291
14301
  constructor({ page, neetoPlaywrightUtilities, }) {
14292
- this.navigateToTeamMembersSublink = async ({ clickMembersTab = true, sublink = "all", } = {}) => {
14293
- clickMembersTab &&
14294
- (await this.page.getByTestId(MEMBER_SELECTORS.membersTab).click());
14295
- await this.page
14296
- .getByTestId(MEMBER_SELECTORS.menubarSubLink(sublink))
14297
- .click();
14302
+ this.navigateToTeamMembers = async () => {
14303
+ await this.page.getByTestId(MEMBER_SELECTORS.membersTab).click();
14298
14304
  await this.neetoPlaywrightUtilities.waitForPageLoad();
14299
14305
  };
14300
14306
  this.addMemberViaUI = async ({ emails = [faker.faker.internet.exampleEmail()], role = "standard", } = {}) => {
@@ -14350,15 +14356,13 @@ class TeamMembers {
14350
14356
  await this.neetoPlaywrightUtilities.verifySuccessToast();
14351
14357
  await this.neetoPlaywrightUtilities.waitForPageLoad();
14352
14358
  };
14353
- this.toggleMemberStateViaUI = async () => {
14359
+ this.removeMemberViaUI = async () => {
14354
14360
  await this.page.getByTestId(MEMBER_SELECTORS.dropDownIcon).click();
14355
- await this.page
14356
- .getByTestId(MEMBER_SELECTORS.activateOrDeactivateMember)
14357
- .click();
14361
+ await this.page.getByTestId(MEMBER_SELECTORS.removeMember).click();
14358
14362
  await this.page
14359
14363
  .getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
14360
14364
  .click();
14361
- await this.neetoPlaywrightUtilities.verifySuccessToast();
14365
+ await this.neetoPlaywrightUtilities.verifyToast();
14362
14366
  await this.neetoPlaywrightUtilities.waitForPageLoad();
14363
14367
  };
14364
14368
  this.filterMembersByMultiSelect = async ({ selectedOptions = [], selectContainerLocator = NEETO_FILTERS_SELECTORS.roleSelectContainer, }) => {