From 29c7da415b9fa6a5b8f062acf6341d1f2a78cc4c Mon Sep 17 00:00:00 2001 From: Todor Date: Mon, 23 Oct 2023 16:35:21 +0300 Subject: [PATCH 1/2] Add e2e selector --- src/lib/chat-widgets.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib/chat-widgets.js b/src/lib/chat-widgets.js index c7548cf..1886eb9 100644 --- a/src/lib/chat-widgets.js +++ b/src/lib/chat-widgets.js @@ -26,7 +26,7 @@ export const chatMarkup = (config) => `
- + ${paymentButton(config.translations)} ${loadingDots} ${chatPaymentFormContainer(config.translations)} @@ -38,13 +38,13 @@ export const chatMarkup = (config) => `
+ }" data-e2e="email-input"> ${loaderEmail} -
+
${sendIcon}
@@ -91,6 +91,7 @@ export const rolesHTML = { const elementContent = document.createElement('span'); elementContent.className = 'js-assistant-message'; element.classList.add('assistant'); + element.dataset.e2e = "stream-assistant-msg"; element.appendChild(elementContent); const { extractedString, updatedMessage } = extractStringWithBrackets(content); @@ -127,17 +128,18 @@ export const imageMarkup = (extractedLink) => { export const timeMarkup = (time) => { const element = document.createElement('div'); element.classList.add('date-formatted'); + element.dataset.e2e = "stream-assistant-msg-date"; element.textContent = formatDateByLocale(time); return element; }; -export const loadingDots = `