-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from RasaHQ/feature/error-toast-message-on-net…
…work-issue-socket-io test(e2e):Error toast message on Socket IO connection
- Loading branch information
Showing
12 changed files
with
3,608 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-49 Bytes
(100%)
e2e/cypress/screenshots/base/errorToastMessageFullScreen #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+33.4 KB
e2e/cypress/screenshots/base/errorToastMessageSocketIOFullScreen #0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import { chatbotWidgetPage } from '@rasa-cypress-POM/chatbotWidgetPOM'; | ||
import { | ||
userInputs, | ||
widgetProps, | ||
} from '@rasa-cypress-fixtures/chatbotWidgetData'; | ||
|
||
describe('Error Toast message on Network Connectivity issues with Socket IO connection', () => { | ||
const mockedServerUrl = Cypress.env('mockedServerUrl'); | ||
|
||
beforeEach(() => { | ||
cy.setPropertiesAndOpenThePage([ | ||
{ key: 'server-url', value: mockedServerUrl }, | ||
widgetProps.toggleFullScreen, | ||
]); | ||
}); | ||
|
||
it('TC010 - Error toast message on Network connectivity issue - Socket IO', () => { | ||
chatbotWidgetPage.widgetLauncher.click(); | ||
|
||
cy.userSendMessage(userInputs.textMessage); | ||
|
||
chatbotWidgetPage.userChatMessage.should('be.visible'); | ||
|
||
chatbotWidgetPage.widgetSessionDivider.should('be.visible'); | ||
|
||
cy.checkUserMessageIsSent(userInputs.textMessage); | ||
|
||
chatbotWidgetPage.botChatTextMessage.should('be.visible'); | ||
|
||
chatbotWidgetPage.botChatTextMessage | ||
.get('span') | ||
.should( | ||
'contain.text', | ||
"I understand you want to be connected to a human agent, but that's something I cannot help you with at the moment. Is there something else I can help you with?" | ||
); | ||
|
||
cy.userSendMessage(userInputs.errorConnectionSocketioTest); | ||
|
||
cy.checkUserMessageIsSent(userInputs.errorConnectionSocketioTest); | ||
|
||
chatbotWidgetPage.errorToastMessage.should('be.visible'); | ||
|
||
cy.matchImage({ | ||
title: 'errorToastMessageSocketIO', | ||
}); | ||
}); | ||
|
||
it('TC011 - Error toast message on Network connectivity issue - Socket IO - Full screen mode', () => { | ||
chatbotWidgetPage.rasaChatbotWidget.should( | ||
'have.attr', | ||
'toggle-full-screen' | ||
); | ||
|
||
chatbotWidgetPage.widgetLauncher.click(); | ||
|
||
chatbotWidgetPage.toggleFullScreen.should('be.visible'); | ||
|
||
chatbotWidgetPage.toggleFullScreen.click(); | ||
|
||
chatbotWidgetPage.widgetOpened.should( | ||
'have.class', | ||
'messenger--fullscreen' | ||
); | ||
|
||
cy.userSendMessage(userInputs.textMessage); | ||
|
||
chatbotWidgetPage.userChatMessage.should('be.visible'); | ||
|
||
chatbotWidgetPage.widgetSessionDivider.should('be.visible'); | ||
|
||
cy.checkUserMessageIsSent(userInputs.textMessage); | ||
|
||
chatbotWidgetPage.botChatTextMessage.should('be.visible'); | ||
|
||
chatbotWidgetPage.botChatTextMessage | ||
.get('span') | ||
.should( | ||
'contain.text', | ||
"I understand you want to be connected to a human agent, but that's something I cannot help you with at the moment. Is there something else I can help you with?" | ||
); | ||
|
||
cy.userSendMessage(userInputs.errorConnectionSocketioTest); | ||
|
||
cy.checkUserMessageIsSent(userInputs.errorConnectionSocketioTest); | ||
|
||
chatbotWidgetPage.errorToastMessage.should('be.visible'); | ||
|
||
cy.matchImage({ | ||
title: 'errorToastMessageSocketIOFullScreen', | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.