Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
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
sispub
openbis
Commits
d5ce2726
Commit
d5ce2726
authored
9 years ago
by
pkupczyk
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-2362 : V3 AS API - global search - more js-tests
SVN: 35686
parent
cf469dbc
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
js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-search.js
+29
-1
29 additions, 1 deletion
...1/as/webapps/openbis-v3-api-test/html/test/test-search.js
with
29 additions
and
1 deletion
js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-search.js
+
29
−
1
View file @
d5ce2726
...
@@ -592,7 +592,7 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common', 'test/naturalsort' ],
...
@@ -592,7 +592,7 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common', 'test/naturalsort' ],
var
fSearch
=
function
(
facade
)
{
var
fSearch
=
function
(
facade
)
{
var
criteria
=
new
c
.
GlobalSearchCriteria
();
var
criteria
=
new
c
.
GlobalSearchCriteria
();
criteria
.
withText
().
thatContains
(
"
20130412150049446-204 20130412140147735-20 20130417094936021-428 H2O
"
);
criteria
.
withText
().
thatContains
(
"
20130412150049446-204 20130412140147735-20 20130417094936021-428 H2O
"
);
criteria
.
withObjectKind
().
thatIn
([
"
EXPERIMENT
"
]);
criteria
.
withObjectKind
().
thatIn
([
"
EXPERIMENT
"
]);
return
facade
.
searchGlobally
(
criteria
,
c
.
createGlobalSearchObjectFetchOptions
());
return
facade
.
searchGlobally
(
criteria
,
c
.
createGlobalSearchObjectFetchOptions
());
}
}
...
@@ -614,5 +614,33 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common', 'test/naturalsort' ],
...
@@ -614,5 +614,33 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common', 'test/naturalsort' ],
testSearch
(
c
,
fSearch
,
fCheck
);
testSearch
(
c
,
fSearch
,
fCheck
);
});
});
QUnit
.
test
(
"
searchGlobally() withWildCards
"
,
function
(
assert
)
{
var
c
=
new
common
(
assert
);
var
fSearch
=
function
(
facade
)
{
var
criteria
=
new
c
.
GlobalSearchCriteria
();
criteria
.
withText
().
thatContains
(
"
256x25*
"
);
criteria
.
withWildCards
();
return
facade
.
searchGlobally
(
criteria
,
c
.
createGlobalSearchObjectFetchOptions
());
}
var
fCheck
=
function
(
facade
,
objects
)
{
c
.
assertEqual
(
objects
.
length
,
1
);
var
object0
=
objects
[
0
];
c
.
assertEqual
(
object0
.
getObjectKind
(),
"
DATA_SET
"
,
"
ObjectKind
"
);
c
.
assertEqual
(
object0
.
getObjectPermId
().
getPermId
(),
"
20130412142942295-198
"
,
"
ObjectPermId
"
);
c
.
assertEqual
(
object0
.
getObjectIdentifier
().
getPermId
(),
"
20130412142942295-198
"
,
"
ObjectIdentifier
"
);
c
.
assertEqual
(
object0
.
getMatch
(),
"
Property 'Resolution': 256x256
"
,
"
Match
"
);
c
.
assertNotNull
(
object0
.
getScore
(),
"
Score
"
);
c
.
assertEqual
(
object0
.
getDataSet
().
getCode
(),
"
20130412142942295-198
"
,
"
DataSet
"
);
c
.
assertNull
(
object0
.
getExperiment
(),
"
Experiment
"
);
c
.
assertNull
(
object0
.
getSample
(),
"
Sample
"
);
c
.
assertNull
(
object0
.
getMaterial
(),
"
Material
"
);
}
testSearch
(
c
,
fSearch
,
fCheck
);
});
}
}
});
});
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