@@ -277,7 +277,11 @@ describe("RelationshipTemplates query", () => {
277
277
maxNumberOfAllocations : 1 ,
278
278
expiresAt : DateTime . utc ( ) . plus ( { minutes : 10 } ) . toString ( ) ,
279
279
content : emptyRelationshipTemplateContent ,
280
- forIdentity : runtimeServices1 . address
280
+ forIdentity : runtimeServices1 . address ,
281
+ passwordProtection : {
282
+ password : "1234" ,
283
+ passwordIsPin : true
284
+ }
281
285
} )
282
286
) . value ;
283
287
const conditions = new QueryParamConditions < GetRelationshipTemplatesQuery > ( template , runtimeServices1 . transport )
@@ -287,7 +291,28 @@ describe("RelationshipTemplates query", () => {
287
291
. addStringSet ( "createdBy" )
288
292
. addStringSet ( "createdByDevice" )
289
293
. addNumberSet ( "maxNumberOfAllocations" )
290
- . addStringSet ( "forIdentity" ) ;
294
+ . addStringSet ( "forIdentity" )
295
+ . addSingleCondition ( {
296
+ expectedResult : true ,
297
+ key : "passwordProtection" ,
298
+ value : ""
299
+ } )
300
+ . addSingleCondition ( {
301
+ expectedResult : false ,
302
+ key : "passwordProtection" ,
303
+ value : "!"
304
+ } )
305
+ . addStringSet ( "passwordProtection.password" )
306
+ . addSingleCondition ( {
307
+ expectedResult : true ,
308
+ key : "passwordProtection.passwordIsPin" ,
309
+ value : "true"
310
+ } )
311
+ . addSingleCondition ( {
312
+ expectedResult : false ,
313
+ key : "passwordProtection.passwordIsPin" ,
314
+ value : "!"
315
+ } ) ;
291
316
292
317
await conditions . executeTests ( ( c , q ) => c . relationshipTemplates . getRelationshipTemplates ( { query : q } ) ) ;
293
318
} ) ;
@@ -297,15 +322,29 @@ describe("RelationshipTemplates query", () => {
297
322
await runtimeServices1 . transport . relationshipTemplates . createOwnRelationshipTemplate ( {
298
323
maxNumberOfAllocations : 1 ,
299
324
expiresAt : DateTime . utc ( ) . plus ( { minutes : 10 } ) . toString ( ) ,
300
- content : emptyRelationshipTemplateContent
325
+ content : emptyRelationshipTemplateContent ,
326
+ passwordProtection : {
327
+ password : "password"
328
+ }
301
329
} )
302
330
) . value ;
303
331
const conditions = new QueryParamConditions < GetRelationshipTemplatesQuery > ( template , runtimeServices1 . transport )
304
332
. addDateSet ( "createdAt" )
305
333
. addDateSet ( "expiresAt" )
306
334
. addStringSet ( "createdBy" )
307
335
. addStringSet ( "createdByDevice" )
308
- . addNumberSet ( "maxNumberOfAllocations" ) ;
336
+ . addNumberSet ( "maxNumberOfAllocations" )
337
+ . addStringSet ( "passwordProtection.password" )
338
+ . addSingleCondition ( {
339
+ expectedResult : false ,
340
+ key : "passwordProtection.passwordIsPin" ,
341
+ value : "true"
342
+ } )
343
+ . addSingleCondition ( {
344
+ expectedResult : true ,
345
+ key : "passwordProtection.passwordIsPin" ,
346
+ value : "!"
347
+ } ) ;
309
348
await conditions . executeTests ( ( c , q ) => c . relationshipTemplates . getRelationshipTemplates ( { query : q , ownerRestriction : OwnerRestriction . Own } ) ) ;
310
349
} ) ;
311
350
@@ -323,7 +362,17 @@ describe("RelationshipTemplates query", () => {
323
362
. addDateSet ( "expiresAt" )
324
363
. addStringSet ( "createdBy" )
325
364
. addStringSet ( "createdByDevice" )
326
- . addNumberSet ( "maxNumberOfAllocations" ) ;
365
+ . addNumberSet ( "maxNumberOfAllocations" )
366
+ . addSingleCondition ( {
367
+ expectedResult : false ,
368
+ key : "passwordProtection" ,
369
+ value : ""
370
+ } )
371
+ . addSingleCondition ( {
372
+ expectedResult : true ,
373
+ key : "passwordProtection" ,
374
+ value : "!"
375
+ } ) ;
327
376
328
377
await conditions . executeTests ( ( c , q ) => c . relationshipTemplates . getRelationshipTemplates ( { query : q , ownerRestriction : OwnerRestriction . Peer } ) ) ;
329
378
} ) ;
0 commit comments