@bigbinary/neeto-playwright-commons 1.10.6 → 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.d.ts CHANGED
@@ -3584,6 +3584,8 @@ declare const MERGE_TAGS_SELECTORS: {
3584
3584
  *
3585
3585
  * closeChat: Selector for the close button in the chat widget.
3586
3586
  *
3587
+ * chatQuestionHeader: Selector for the chat question header.
3588
+ *
3587
3589
  */
3588
3590
  declare const CHAT_WIDGET_SELECTORS: {
3589
3591
  iframe: string;
@@ -3593,6 +3595,7 @@ declare const CHAT_WIDGET_SELECTORS: {
3593
3595
  preChatSubmitButton: string;
3594
3596
  chatBubble: string;
3595
3597
  closeChat: string;
3598
+ chatQuestionHeader: string;
3596
3599
  };
3597
3600
  /**
3598
3601
  *
@@ -3962,6 +3965,7 @@ declare const NEETO_IMAGE_UPLOADER_SELECTORS: {
3962
3965
  declare const CHAT_WIDGET_TEXTS: {
3963
3966
  newConversation: string;
3964
3967
  welcomeChatBubble: string;
3968
+ preChatQuestions: string;
3965
3969
  };
3966
3970
  /**
3967
3971
  *
package/index.js CHANGED
@@ -12801,6 +12801,7 @@ class EmbedBase {
12801
12801
  const CHAT_WIDGET_TEXTS = {
12802
12802
  newConversation: "Ask a question",
12803
12803
  welcomeChatBubble: "Hi! I'm here to assist you with any questions you may have. What can I do for you?",
12804
+ preChatQuestions: "Please fill in the form to start chatting.",
12804
12805
  };
12805
12806
  const MEMBER_TEXTS = {
12806
12807
  agent: "Agent",
@@ -12883,6 +12884,7 @@ const CHAT_WIDGET_SELECTORS = {
12883
12884
  preChatSubmitButton: "neeto-chat-widget-pre-chat-submit-btn",
12884
12885
  chatBubble: "neeto-chat-widget-chat-message-bubble",
12885
12886
  closeChat: "neeto-chat-widget-close-btn",
12887
+ chatQuestionHeader: "chat-question-header",
12886
12888
  };
12887
12889
  const CHANGELOG_WIDGET_SELECTORS = {
12888
12890
  changelogWrapper: ".nc-widget__wrapper",
@@ -12941,6 +12943,14 @@ class HelpAndProfilePage {
12941
12943
  await expect(newConversationButton).toBeVisible({ timeout: 35000 }); // Adding additional toBeVisible to take advantage of the auto-retrying web-first assertion
12942
12944
  await newConversationButton.click();
12943
12945
  await expect(this.neetoChatSpinner).toBeHidden({ timeout: 35000 });
12946
+ (await this.neetoChatFrame
12947
+ .getByTestId(CHAT_WIDGET_SELECTORS.chatQuestionHeader)
12948
+ .getByText(CHAT_WIDGET_TEXTS.preChatQuestions)
12949
+ .isVisible()) &&
12950
+ (await this.neetoChatFrame
12951
+ .getByTestId(CHAT_WIDGET_SELECTORS.preChatSubmitButton)
12952
+ .click());
12953
+ await expect(this.neetoChatSpinner).toBeHidden({ timeout: 35000 });
12944
12954
  });
12945
12955
  await test$2.step("Step 4: Verify conversation window", async () => {
12946
12956
  await expect(this.neetoChatFrame.getByTestId(CHAT_WIDGET_SELECTORS.chatBubble)).toHaveText(CHAT_WIDGET_TEXTS.welcomeChatBubble);