Merge pull request #7978 from MaximKhlobystov/tests-enter-key-issue
Automated tests: button clicks instead of pressing Enter key
This commit is contained in:
commit
5550e75c50
@ -317,6 +317,7 @@ class MessageForm extends PureComponent {
|
||||
color="primary"
|
||||
icon="send"
|
||||
onClick={() => {}}
|
||||
data-test="sendMessageButton"
|
||||
/>
|
||||
</div>
|
||||
<TypingIndicatorContainer {...{ error }} />
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user