@@ -111,7 +111,11 @@ describeWithAuth('api read-only routes', () => {
111111 } ) ;
112112 } ) ;
113113
114- describe ( '/query search statements by keyword' , ( ) => {
114+ // KBDEV-1426. Skipping keyword queryType tests for OrientDB != 3.0
115+ ( process . env . ORIENTDB_VERSION === '3.0' || process . env . ORIENTDB_VERSION === undefined
116+ ? describe
117+ : describe . skip
118+ ) ( '/query search statements by keyword' , ( ) => {
115119 test ( 'count ignores limit' , async ( ) => {
116120 const response = await request ( {
117121 body : {
@@ -146,10 +150,10 @@ describeWithAuth('api read-only routes', () => {
146150 expect ( response . body . result ) . toHaveProperty ( 'length' , 2 ) ;
147151 } ) ;
148152
149- test ( 'multiple keywords are co-required' , async ( ) => {
153+ test ( 'multiple keywords are co-required; without match ' , async ( ) => {
150154 const response = await request ( {
151155 body : {
152- keyword : 'kras, resistance' ,
156+ keyword : 'kras resistance' ,
153157 queryType : 'keyword' ,
154158 target : 'Statement' ,
155159 } ,
@@ -162,6 +166,22 @@ describeWithAuth('api read-only routes', () => {
162166 expect ( response . body . result ) . toHaveProperty ( 'length' , 0 ) ;
163167 } ) ;
164168
169+ test ( 'multiple keywords are co-required; with match' , async ( ) => {
170+ const response = await request ( {
171+ body : {
172+ keyword : 'kras gain of function' ,
173+ queryType : 'keyword' ,
174+ target : 'Statement' ,
175+ } ,
176+ headers : { Authorization : mockToken } ,
177+ method : 'POST' ,
178+ uri,
179+ } ) ;
180+ expect ( response . statusCode ) . toBe ( HTTP_STATUS . OK ) ;
181+ expect ( response . body ) . toHaveProperty ( 'result' ) ;
182+ expect ( response . body . result ) . toHaveProperty ( 'length' , 1 ) ;
183+ } ) ;
184+
165185 test ( 'error on no body' , async ( ) => {
166186 try {
167187 await request ( {
0 commit comments