Merge pull request #7978 from MaximKhlobystov/tests-enter-key-issue

Automated tests: button clicks instead of pressing Enter key
This commit is contained in:
Anton Georgiev 2019-08-23 16:15:51 -04:00 committed by GitHub
commit 5550e75c50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 4 deletions

View File

@ -317,6 +317,7 @@ class MessageForm extends PureComponent {
color="primary"
icon="send"
onClick={() => {}}
data-test="sendMessageButton"
/>
</div>
<TypingIndicatorContainer {...{ error }} />

View File

@ -16,7 +16,7 @@ class ChatPage extends Page {
sendPublicChatMessage(message) {
this.publicChatElement.setValue(message);
pageObject.pressEnter();
this.sendMessageButtonElement.click();
}
// ////////
@ -74,6 +74,16 @@ class ChatPage extends Page {
copyChat() {
this.copyChatButtonElement.click();
}
// ////////
get sendMessageButtonSelector() {
return '[data-test=sendMessageButton]';
}
get sendMessageButtonElement() {
return $(this.sendMessageButtonSelector);
}
}
module.exports = new ChatPage();

View File

@ -13,7 +13,7 @@ const loginWithoutAudio = function (username) {
// login
LandingPage.open();
browser.setValue(LandingPage.usernameInputSelector, username);
LandingPage.joinWithEnterKey();
LandingPage.joinWithButtonClick();
// close audio modal
browser.waitForExist(ModalPage.modalCloseSelector, WAIT_TIME);

View File

@ -11,7 +11,7 @@ const loginWithoutAudio = function (username) {
// login
LandingPage.open();
browser.setValue(LandingPage.usernameInputSelector, username);
LandingPage.joinWithEnterKey();
LandingPage.joinWithButtonClick();
// close audio modal
browser.waitForExist(ModalPage.modalCloseSelector, WAIT_TIME);

View File

@ -34,7 +34,7 @@ describe('Settings', () => {
LandingPage.open();
browser.setValue(LandingPage.usernameInputSelector, 'user');
browser.setValue(LandingPage.meetingNameInputSelector, 'Demo Meeting Tests');
LandingPage.joinWithEnterKey();
LandingPage.joinWithButtonClick();
closeAudioModal();
});