Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nrp-frontend
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Neurorobotics Platform
nrp-frontend
Commits
b61927a5
Commit
b61927a5
authored
3 years ago
by
Detailleur
Browse files
Options
Downloads
Patches
Plain Diff
[NRRPLT-8288] take out ROSLIB tests
parent
71e5de2f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/services/experiments/execution/__tests__/running-simulation-service.test.js
+12
-12
12 additions, 12 deletions
...ts/execution/__tests__/running-simulation-service.test.js
with
12 additions
and
12 deletions
src/services/experiments/execution/__tests__/running-simulation-service.test.js
+
12
−
12
View file @
b61927a5
...
...
@@ -109,32 +109,32 @@ test('register for ROS status information', () => {
});
let
progressMessageCallback
=
jest
.
fn
();
// we register twice to check that
the
original sub is
conserv
ed without error
// we register twice to check that original sub is
destroyed and re-creat
ed without error
RunningSimulationService
.
instance
.
addRosStatusInfoCallback
(
'
test-ros-ws-url
'
,
progressMessageCallback
);
RunningSimulationService
.
instance
.
addRosStatusInfoCallback
(
'
test-ros-ws-url
'
,
progressMessageCallback
);
expect
(
RoslibService
.
instance
.
getConnection
.
mock
.
calls
.
length
).
toBe
(
1
);
expect
(
mockStatusListener
.
removeAllListeners
.
mock
.
calls
.
length
).
toBe
(
0
);
expect
(
RoslibService
.
instance
.
getConnection
.
mock
.
calls
.
length
).
toBe
(
2
);
expect
(
mockStatusListener
.
removeAllListeners
.
mock
.
calls
.
length
).
toBe
(
1
);
// send status update with task info
let
rosStatusData
=
{
task
:
'
test-some-task
'
,
subtask
:
'
test-some-subtask
'
progress
:
{
task
:
'
test-some-task
'
,
subtask
:
'
test-some-subtask
'
}
};
statusUpdateCallback
({
data
:
JSON
.
stringify
(
rosStatusData
)
});
expect
(
progressMessageCallback
).
toHaveBeenCalledWith
({
task
:
rosStatusData
.
task
,
sub
task
:
rosStatusData
.
subtask
main
:
rosStatusData
.
progress
.
task
,
sub
:
rosStatusData
.
progress
.
subtask
});
// send status update indicating we're done
rosStatusData
=
{
done
:
true
}
rosStatusData
.
progress
.
done
=
true
;
statusUpdateCallback
({
data
:
JSON
.
stringify
(
rosStatusData
)
});
expect
(
progressMessageCallback
).
toHaveBeenCalledWith
({
done
:
true
main
:
'
Simulation initialized.
'
});
expect
(
mockStatusListener
.
removeAllListeners
.
mock
.
calls
.
length
).
toBe
(
0
);
expect
(
mockStatusListener
.
removeAllListeners
.
mock
.
calls
.
length
).
toBe
(
2
);
});
test
(
'
can retrieve the state of a simulation
'
,
async
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment