Commit 283ae9d5 authored by Yoann HOUPERT's avatar Yoann HOUPERT
Browse files

Add comment for robot initialisation

Reduce eslint bloc size
parent 0a1475c4
Pipeline #4900 passed with stage
in 37 seconds
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
/* exported robot */ /* exported robot */
robot = { robot = {
// The variable 'room' and 'clientConfig' will be initialized at the call of start function
room: '', room: '',
clientConfig: {}, clientConfig: {},
previousReco: [], previousReco: [],
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* global robot:true robotController */
const webdriverio = require('webdriverio'); const webdriverio = require('webdriverio');
// Utility function to resolve a list of promise-based function calls // Utility function to resolve a list of promise-based function calls
...@@ -44,11 +42,17 @@ module.exports = config => ({ ...@@ -44,11 +42,17 @@ module.exports = config => ({
.then(() => resolveSequentially(f => client.execute(f, room, clientConfig), .then(() => resolveSequentially(f => client.execute(f, room, clientConfig),
controllerFilesList)) controllerFilesList))
.then(() => console.log('runner: modules resolved')) .then(() => console.log('runner: modules resolved'))
.then(() => client.execute(clientConfig => robotController.external.load(clientConfig), clientConfig)) .then(() => client.execute(clientConfig =>
/* eslint-disable no-undef */
robotController.external.load(clientConfig), clientConfig)
/* eslint-enable */
)
.then(() => console.log('runner: external loaded')) .then(() => console.log('runner: external loaded'))
.then(() => client.execute((room, clientConfig) => { .then(() => client.execute((room, clientConfig) => {
setTimeout(() => { setTimeout(() => {
/* eslint-disable no-undef */
robot.start(room, clientConfig); robot.start(room, clientConfig);
/* eslint-enable */
}, 500); }, 500);
}, room, clientConfig)) }, room, clientConfig))
.then(() => console.log('runner: robot started')) .then(() => console.log('runner: robot started'))
......
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