diff --git a/e2e/RasaChatbotWidgetTestCases.xlsx b/e2e/RasaChatbotWidgetTestCases.xlsx index 6fefd34..83e2fd5 100644 Binary files a/e2e/RasaChatbotWidgetTestCases.xlsx and b/e2e/RasaChatbotWidgetTestCases.xlsx differ diff --git a/e2e/cypress/fixtures/chatbotWidgetData.ts b/e2e/cypress/fixtures/chatbotWidgetData.ts index 808d5f9..216b9f6 100644 --- a/e2e/cypress/fixtures/chatbotWidgetData.ts +++ b/e2e/cypress/fixtures/chatbotWidgetData.ts @@ -3,8 +3,10 @@ import { link } from 'fs'; const userInputs = { textMessage: 'Hello', imageMessage: 'Image', + highResolutionImageMessage: 'HR_image', accordionMessage: 'Accordion', carouselMessage: 'Carousel', + highResolutionImageCarouselMessage: 'Carousel_with_high_resolution', fileDownloadMessage: 'File', quickRepliesMessage: 'Markdown', videoMessage: 'Video', @@ -30,6 +32,15 @@ const botResponses = { }, }, }, + HR_image: { + text: 'You are seeing high resolution image.', + attachment: { + type: 'image', + payload: { + src: 'https://store.hrblock.com/shoppingcart/assets/Win_H2.png', + }, + }, + }, Accordion: { type: 'accordion', elements: [ @@ -69,6 +80,21 @@ const botResponses = { }, ], }, + Carousel_with_high_resolution: { + type: 'carousel', + elements: [ + { + image_url: 'https://store.hrblock.com/shoppingcart/assets/Win_H2.png', + text: 'Click here for more details on Premium & Business', + }, + { + image_url: + 'https://static1.moviewebimages.com/wordpress/wp-content/uploads/2023/04/scott-balua-as-captain-archer-in-enterprise-cbs-televisio.jpg', + text: 'Click here for more details on Jonathan Archer', + link: 'https://memory-alpha.fandom.com/wiki/Jonathan_Archer', + }, + ], + }, File: { type: 'file_download', text: 'Download the Open-Source Rasa Python SDK', diff --git a/e2e/cypress/screenshots/base/carouselWithHighResolutionImageMessageResponse #0.png b/e2e/cypress/screenshots/base/carouselWithHighResolutionImageMessageResponse #0.png new file mode 100644 index 0000000..445038b Binary files /dev/null and b/e2e/cypress/screenshots/base/carouselWithHighResolutionImageMessageResponse #0.png differ diff --git a/e2e/cypress/screenshots/base/highResolutionImageMessageResponse #0.png b/e2e/cypress/screenshots/base/highResolutionImageMessageResponse #0.png new file mode 100644 index 0000000..445038b Binary files /dev/null and b/e2e/cypress/screenshots/base/highResolutionImageMessageResponse #0.png differ diff --git a/e2e/cypress/tests/responseTypesSocketConnection.cy.ts b/e2e/cypress/tests/responseTypesSocketConnection.cy.ts index 1944805..13b927b 100644 --- a/e2e/cypress/tests/responseTypesSocketConnection.cy.ts +++ b/e2e/cypress/tests/responseTypesSocketConnection.cy.ts @@ -290,4 +290,76 @@ describe('Response messages types', () => { title: 'videoMessageResponse', }); }); + + it('TC023 - Response message type: High resolution image', () => { + chatbotWidgetPage.widgetLauncher.should('be.visible'); + + chatbotWidgetPage.widgetLauncher.click(); + + chatbotWidgetPage.widgetOpened.should('be.visible'); + + chatbotWidgetPage.widgetHeader.should('be.visible'); + + chatbotWidgetPage.widgetInputField.should('be.visible'); + + chatbotWidgetPage.widgetSendButton.should('be.visible'); + + cy.userSendMessage(userInputs.highResolutionImageMessage); + + chatbotWidgetPage.userChatMessage.should('be.visible'); + + cy.checkUserMessageIsSent(userInputs.highResolutionImageMessage); + + chatbotWidgetPage.botChatImageMessage.should('be.visible'); + + chatbotWidgetPage.botChatImageMessage + .find('img') + .should( + 'have.attr', + 'src', + 'https://store.hrblock.com/shoppingcart/assets/Win_H2.png' + ); + + cy.wait(1000); + + chatbotWidgetPage.widgetOpened.wait(1000).matchImage({ + title: 'highResolutionImageMessageResponse', + }); + }); + + it('TC024 - Response message type: Carousel with high resolution image', () => { + chatbotWidgetPage.widgetLauncher.click(); + + chatbotWidgetPage.widgetOpened.should('be.visible'); + + chatbotWidgetPage.widgetHeader.should('be.visible'); + + chatbotWidgetPage.widgetInputField.should('be.visible'); + + chatbotWidgetPage.widgetSendButton.should('be.visible'); + + cy.userSendMessage(userInputs.highResolutionImageCarouselMessage); + + chatbotWidgetPage.userChatMessage.should('be.visible'); + + cy.checkUserMessageIsSent(userInputs.highResolutionImageCarouselMessage); + + chatbotWidgetPage.botChatCarouselMessage.should('be.visible'); + + chatbotWidgetPage.botChatCarouselRightIcon.should('be.visible'); + + chatbotWidgetPage.botChatCarouselRightIcon.click(); + + chatbotWidgetPage.botChatCarouselLeftIcon.should('be.visible'); + + chatbotWidgetPage.botChatCarouselLeftIcon.click(); + + chatbotWidgetPage.botChatCarouselLeftIcon.should('not.exist'); + + cy.wait(2000); + + chatbotWidgetPage.widgetOpened.matchImage({ + title: 'carouselWithHighResolutionImageMessageResponse', + }); + }); });