This commit is contained in:
Belen Curcio
2016-12-18 11:31:27 -03:00
parent 27ffb05454
commit 428a62ffd4
18 changed files with 7402 additions and 81 deletions
+15 -3
View File
@@ -1,12 +1,18 @@
const fetch = require('node-fetch');
const embedCommands = {
const embedStreamCommands = {
ready() {
return this.resizeWindow(1200, 800)
.url(client.globals.baseUrl)
.waitForElementVisible('body', 2000)
.frame('coralStreamIframe');
},
login(userData) {
return this
.waitForElementVisible('@signInButton')
.click('@signInButton')
.waitForElementVisible('@signInDialog');
},
setConfig(config, baseUrl) {
return fetch(`${baseUrl}/api/v1/settings`, {
method: 'PUT',
@@ -28,12 +34,18 @@ const embedCommands = {
validateComment(comment) {
return this
.assert.equal(comment, '.comment');
}
},
};
export default {
commands: [embedCommands],
commands: [embedStreamCommands],
elements: {
signInButton: {
selector: '#coralSignInButton'
},
signInDialog:{
selector: '#signInDialog'
},
commentBox: {
selector: '#commentBox'
},