Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
4c720298
Commit
4c720298
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
method names refactored
parent
700cc6e7
No related branches found
No related tags found
1 merge request
!8
Resolve "missing methods for JS app API"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend-js/src/main/js/minerva.js
+3
-3
3 additions, 3 deletions
frontend-js/src/main/js/minerva.js
frontend-js/src/test/js/minerva-test.js
+18
-6
18 additions, 6 deletions
frontend-js/src/test/js/minerva-test.js
with
21 additions
and
9 deletions
frontend-js/src/main/js/minerva.js
+
3
−
3
View file @
4c720298
...
...
@@ -216,7 +216,7 @@ function createResult(customMap) {
getProject
:
function
()
{
return
customMap
.
getProject
();
},
get
Element
ById
:
function
(
param
)
{
get
BioEntity
ById
:
function
(
param
)
{
var
identifiedElement
=
new
IdentifiedElement
(
param
);
var
model
=
customMap
.
getModel
().
getSubmodelById
(
identifiedElement
.
getModelId
());
return
model
.
getByIdentifiedElement
(
identifiedElement
,
true
);
...
...
@@ -226,14 +226,14 @@ function createResult(customMap) {
customMap
.
destroy
();
});
},
show
Element
:
function
(
params
)
{
show
BioEntity
:
function
(
params
)
{
var
iconElements
=
createMarkerElements
(
params
,
"
ICON
"
,
true
);
var
surfaceElements
=
createMarkerElements
(
params
,
"
SURFACE
"
,
false
);
return
customMap
.
getOverlayByName
(
"
user
"
).
addMarker
(
iconElements
).
then
(
function
()
{
return
customMap
.
getOverlayByName
(
"
user
"
).
addSurface
(
surfaceElements
);
});
},
hide
Element
:
function
(
params
)
{
hide
BioEntity
:
function
(
params
)
{
var
iconElements
=
createMarkerElements
(
params
,
"
ICON
"
,
true
);
var
surfaceElements
=
createMarkerElements
(
params
,
"
SURFACE
"
,
false
);
return
customMap
.
getOverlayByName
(
"
user
"
).
removeMarker
(
iconElements
).
then
(
function
()
{
...
...
This diff is collapsed.
Click to expand it.
frontend-js/src/test/js/minerva-test.js
+
18
−
6
View file @
4c720298
...
...
@@ -238,7 +238,7 @@ describe('minerva global', function() {
});
});
it
(
"
get
Element
ById
"
,
function
()
{
it
(
"
get
BioEntity
ById
"
,
function
()
{
var
options
=
{
projectId
:
"
sample
"
,
element
:
testDiv
...
...
@@ -246,7 +246,7 @@ describe('minerva global', function() {
var
globalResult
;
return
minerva
.
create
(
options
).
then
(
function
(
result
)
{
globalResult
=
result
;
return
result
.
get
Element
ById
({
return
result
.
get
BioEntity
ById
({
id
:
329177
,
modelId
:
15781
,
type
:
"
ALIAS
"
...
...
@@ -287,14 +287,26 @@ describe('minerva global', function() {
};
return
minerva
.
create
(
options
).
then
(
function
(
result
)
{
globalResult
=
result
;
return
globalResult
.
show
Element
(
elementToShow
);
return
globalResult
.
show
BioEntity
(
elementToShow
);
}).
then
(
function
()
{
return
globalResult
.
showElement
(
elementToShow2
);
return
globalResult
.
getHighlightedBioEntities
();
}).
then
(
function
(
elements
)
{
assert
.
equal
(
elements
.
length
,
1
);
return
globalResult
.
showBioEntity
(
elementToShow2
);
}).
then
(
function
()
{
return
globalResult
.
hideElement
(
elementToShow
);
return
globalResult
.
getHighlightedBioEntities
();
}).
then
(
function
(
elements
)
{
assert
.
equal
(
elements
.
length
,
2
);
return
globalResult
.
hideBioEntity
(
elementToShow
);
}).
then
(
function
()
{
return
globalResult
.
hideElement
(
elementToShow2
);
return
globalResult
.
getHighlightedBioEntities
();
}).
then
(
function
(
elements
)
{
assert
.
equal
(
elements
.
length
,
1
);
return
globalResult
.
hideBioEntity
(
elementToShow2
);
}).
then
(
function
()
{
return
globalResult
.
getHighlightedBioEntities
();
}).
then
(
function
(
elements
)
{
assert
.
equal
(
elements
.
length
,
0
);
globalResult
.
destroy
();
});
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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