bigbluebutton-Github/bigbluebutton-html5/tests/nightwatch/chatting.js
Maxim Khlobystov 76aa113dda Autofixed most of the linter warnings related to the Airbnb JavaScript Style Guide.
Conflicts:
	bigbluebutton-html5/client/globals.js
	bigbluebutton-html5/client/views/whiteboard/whiteboard.js
	bigbluebutton-html5/server/collection_methods/users.js
	bigbluebutton-html5/server/server.js
2016-04-06 10:08:08 -03:00

63 lines
2.8 KiB
JavaScript
Executable File

module.exports = {
'Receiving the correct welcome message title in the public chat of Demo Meeting': function (browser) {
browser
.url('http://192.168.244.140:4000')
.waitForElementVisible('body', 1000)
.assert.visible('input[ng-model=username]')
.setValue('input[ng-model=username]', ['Maxim', browser.Keys.ENTER])
.waitForElementVisible('#chatbody .chat li:last-of-type', 10000)
.verify.containsText('#chatbody .chat li:last-of-type div', 'Welcome to Demo Meeting')
.deleteCookies()
.closeWindow()
.end();
},
'Receiving the correct welcome message title in the public chat of a meeting with non-default name': function (browser) {
browser
.url('http://192.168.244.140:4000')
.waitForElementVisible('body', 1000)
.assert.visible('input[ng-model=username]')
.setValue('input[ng-model=username]', 'Maxim')
.assert.visible('input[ng-model=meetingName]')
.setValue('input[ng-model=meetingName]', ['Meeting1', browser.Keys.ENTER])
.waitForElementVisible('#chatbody .chat li:last-of-type', 10000)
.verify.containsText('#chatbody .chat li:last-of-type div', 'Welcome to Meeting1')
.deleteCookies()
.closeWindow()
.end();
},
'Sending a message in a public chat using Enter': function (browser) {
browser
.url('http://192.168.244.140:4000')
.waitForElementVisible('body', 1000)
.assert.visible('input[ng-model=username]')
.setValue('input[ng-model=username]', ['Maxim', browser.Keys.ENTER])
.waitForElementVisible('#newMessageInput', 10000)
.setValue('#newMessageInput', ['this message is to be sent via Enter key', browser.Keys.ENTER])
.pause(500)
.verify.containsText('#chatbody .chat li:last-of-type div', 'this message is to be sent via Enter key')
.verify.containsText('#chatbody .chat li:nth-last-of-type(2) div', 'Welcome to Demo Meeting')
.deleteCookies()
.closeWindow()
.end();
},
'Sending a message in a public chat using Send button': function (browser) {
browser
.url('http://192.168.244.140:4000')
.waitForElementVisible('body', 1000)
.assert.visible('input[ng-model=username]')
.setValue('input[ng-model=username]', ['Maxim', browser.Keys.ENTER])
.waitForElementVisible('#newMessageInput', 10000)
.setValue('#newMessageInput', 'this message is to be sent via Send button')
.click('#sendMessageButton')
.pause(500)
.verify.containsText('#chatbody .chat li:last-of-type div', 'this message is to be sent via Send button')
.verify.containsText('#chatbody .chat li:nth-last-of-type(2) div', 'Welcome to Demo Meeting')
.deleteCookies()
.closeWindow()
.end();
},
};