Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
LINAGORA
L
LGS
Labs
hublot
Commits
0a1475c4
Commit
0a1475c4
authored
Nov 07, 2017
by
Yoann HOUPERT
Browse files
selenium arg give has argument
parent
a5012f1f
Pipeline
#4870
passed with stage
in 42 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
client/robot/robot.js
client/robot/robot.js
+13
-13
lib/runner.js
lib/runner.js
+7
-5
No files found.
client/robot/robot.js
View file @
0a1475c4
...
...
@@ -25,12 +25,9 @@
/* global robot:true robotController robotLib MediaRecorder */
/* exported robot */
const
room
=
arguments
[
0
];
const
config
=
arguments
[
1
];
robotController
.
external
.
load
(
config
);
robot
=
{
room
:
''
,
clientConfig
:
{},
previousReco
:
[],
recordedParticipantsWS
:
{},
participantsMediaRecorders
:
{},
...
...
@@ -88,7 +85,7 @@ robot = {
console
.
log
(
formattedReco
);
if
(
formattedReco
!==
''
)
{
robotController
.
sendMessage
(
config
.
name
,
config
.
avatar
,
formattedReco
);
robotController
.
sendMessage
(
robot
.
config
.
name
,
robot
.
config
.
avatar
,
formattedReco
);
}
},
...
...
@@ -97,7 +94,7 @@ robot = {
console
.
log
(
'
>
'
+
e
.
text
);
robotLib
.
reco
.
send
(
{
from
:
room
,
from
:
robot
.
room
,
text
:
e
.
from
+
'
\t
'
+
e
.
until
+
'
\t
'
+
easyrtcid
+
'
\t
'
+
e
.
text
});
});
...
...
@@ -149,10 +146,13 @@ robot = {
}
},
start
:
()
=>
{
robotLib
.
stt
=
robotLib
.
stt
(
config
);
robotLib
.
reco
=
robotLib
.
reco
(
config
);
robotLib
.
archive
=
robotLib
.
archive
(
config
);
start
:
(
room
,
clientConfig
)
=>
{
robot
.
room
=
room
;
robot
.
clientConfig
=
clientConfig
;
robotLib
.
stt
=
robotLib
.
stt
(
robot
.
clientConfig
);
robotLib
.
reco
=
robotLib
.
reco
(
robot
.
clientConfig
);
robotLib
.
archive
=
robotLib
.
archive
(
robot
.
clientConfig
);
robotController
.
onAttendeePush
=
(
e
,
data
)
=>
{
if
(
data
.
easyrtcid
===
robotController
.
getMyId
())
{
...
...
@@ -174,7 +174,7 @@ robot = {
onConnection
:
()
=>
{
const
recoStartRetry
=
()
=>
{
if
(
robotLib
.
reco
.
start
(
room
))
{
if
(
robotLib
.
reco
.
start
(
robot
.
room
))
{
clearInterval
(
robot
.
recoInterval
);
}
};
...
...
@@ -182,7 +182,7 @@ robot = {
robot
.
intervalList
.
push
(
robot
.
recoInterval
);
robot
.
intervalList
.
push
(
setInterval
(()
=>
robotLib
.
reco
.
getOnlineReco
(
room
)
setInterval
(()
=>
robotLib
.
reco
.
getOnlineReco
(
robot
.
room
)
.
then
(
robot
.
processReco
)
.
catch
(
console
.
error
),
8000
));
...
...
lib/runner.js
View file @
0a1475c4
...
...
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* global robot:true robotController */
const
webdriverio
=
require
(
'
webdriverio
'
);
// Utility function to resolve a list of promise-based function calls
...
...
@@ -42,13 +44,13 @@ module.exports = config => ({
.
then
(()
=>
resolveSequentially
(
f
=>
client
.
execute
(
f
,
room
,
clientConfig
),
controllerFilesList
))
.
then
(()
=>
console
.
log
(
'
runner: modules resolved
'
))
.
then
(()
=>
client
.
execute
(()
=>
{
.
then
(()
=>
client
.
execute
(
clientConfig
=>
robotController
.
external
.
load
(
clientConfig
),
clientConfig
))
.
then
(()
=>
console
.
log
(
'
runner: external loaded
'
))
.
then
(()
=>
client
.
execute
((
room
,
clientConfig
)
=>
{
setTimeout
(()
=>
{
/* eslint-disable no-undef */
robot
.
start
();
/* eslint-enable */
robot
.
start
(
room
,
clientConfig
);
},
500
);
}))
}
,
room
,
clientConfig
))
.
then
(()
=>
console
.
log
(
'
runner: robot started
'
))
.
setValue
(
'
#displayname
'
,
clientConfig
.
name
)
.
click
(
'
.btn
'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment