Commit f90399fa authored by Sami BENHAMICHE's avatar Sami BENHAMICHE
Browse files

Merge branch 'issue-10' into 'master'

client config is now set globally via config file

Closes #10

See merge request !10
parents ce22bd42 e5eb6978
......@@ -7,7 +7,7 @@ controller.loadAll('controller', 'lib', 'robot')
.then(modules => {
// Note: result can be stored in a variable to control further the browser
// e.g.: let client = runner.run(...); client.end();
runner.run(modules, config.visio.url, 'test-bot');
runner.run(modules, config.visio.url, 'test-bot', config.client);
})
.catch(err => {
console.error(err);
......
......@@ -3,7 +3,6 @@
"url": "http://hubl.in"
},
"runner": {
"name": "hublot",
"driver" : {
"desiredCapabilities": {
"browserName": "chrome",
......@@ -16,5 +15,8 @@
}
}
}
}
},
"client": {
"name": "hublot"
}
}
const webdriverio = require('webdriverio');
module.exports = config => ({
run: (controllerFilesList, server, room) => {
run: (controllerFilesList, server, room, clientConfig) => {
const client = webdriverio.remote(config.driver);
return client.init()
.url(server + '/' + room)
.then(() =>
Promise.all(controllerFilesList.map(f => client.execute(f, room, config.name))))
.then(
() => Promise.all(controllerFilesList.map(
f => client.execute(f, room, clientConfig))))
.waitForVisible('#displayname', 30000)
.setValue('#displayname', config.name)
.setValue('#displayname', clientConfig.name)
.click('.btn')
.waitForExist('//div[@video-id="video-thumb8"]', 30000);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment