File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
marklogic-data-hub/src/test/ml-modules/root/test/suites/data-hub/5/data-services/graph Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,25 @@ let expectedEdgeCount = graphUtils.supportsGraphConceptsSearch() ? 4 : 0;
3232let assertions = [
3333 test . assertEqual ( expectedNodeCount , resultsTest . total ) ,
3434 test . assertEqual ( expectedNodeCount , resultsTest . nodes . length ) ,
35- test . assertEqual ( expectedEdgeCount , resultsTest . edges . length ) ,
36- test . assertTrue ( resultsTest . nodes [ 0 ] . hasRelationships )
35+ test . assertEqual ( expectedEdgeCount , resultsTest . edges . length )
3736] ;
3837
38+
3939resultsTest . nodes . forEach ( node => {
40- if ( node . docUri ) {
41- assertions . push ( test . assertTrue ( node . docUri . includes ( "product" ) ) ) ;
42- }
40+ resultsTest . nodes . forEach ( node => {
41+ if ( node . id === "/content/product100.json" ) {
42+ assertions . push ( test . assertTrue ( node . hasRelationships , `Product 100 must have relationships flag in true. Result: ${ xdmp . toJsonString ( node ) } ` ) ) ;
43+ }
44+ else if ( node . id === "/content/product50.json" ) {
45+ assertions . push ( test . assertFalse ( node . hasRelationships , `Product 50 must have relationships flag in false. Result: ${ xdmp . toJsonString ( node ) } ` ) ) ;
46+ }
47+ else if ( node . id === "/content/product60.json" ) {
48+ assertions . push ( test . assertFalse ( node . hasRelationships , `Product 60 must have relationships flag in false. Result: ${ xdmp . toJsonString ( node ) } ` ) ) ;
49+ }
50+ if ( ! node . isConcept ) {
51+ assertions . push ( test . assertTrue ( node . docUri . includes ( "product" ) ) ) ;
52+ }
53+ } )
4354} )
4455
4556assertions ;
You can’t perform that action at this time.
0 commit comments