@@ -12,8 +12,9 @@ import {
12
12
ScheduleUpdateOptions ,
13
13
} from '@temporalio/client' ;
14
14
import { msToNumber } from '@temporalio/common/lib/time' ;
15
- import { SearchAttributes , SearchAttributeType , TypedSearchAttributes } from '@temporalio/common' ;
15
+ import { SearchAttributes , TypedSearchAttributes } from '@temporalio/common' ;
16
16
import { registerDefaultCustomSearchAttributes , RUN_INTEGRATION_TESTS } from './helpers' ;
17
+ import { defaultSAKeys } from './helpers-integration' ;
17
18
18
19
export interface Context {
19
20
client : Client ;
@@ -168,9 +169,7 @@ if (RUN_INTEGRATION_TESTS) {
168
169
searchAttributes : {
169
170
CustomKeywordField : [ 'test-value2' ] ,
170
171
} ,
171
- typedSearchAttributes : new TypedSearchAttributes ( [
172
- { key : { name : 'CustomIntField' , type : SearchAttributeType . INT } , value : 42 } ,
173
- ] ) ,
172
+ typedSearchAttributes : new TypedSearchAttributes ( [ { key : defaultSAKeys . CustomIntField , value : 42 } ] ) ,
174
173
} ,
175
174
} ) ;
176
175
@@ -188,8 +187,8 @@ if (RUN_INTEGRATION_TESTS) {
188
187
t . deepEqual (
189
188
describedSchedule . action . typedSearchAttributes ,
190
189
new TypedSearchAttributes ( [
191
- { key : { name : 'CustomIntField' , type : SearchAttributeType . INT } , value : 42 } ,
192
- { key : { name : 'CustomKeywordField' , type : SearchAttributeType . KEYWORD } , value : 'test-value2' } ,
190
+ { key : defaultSAKeys . CustomIntField , value : 42 } ,
191
+ { key : defaultSAKeys . CustomKeywordField , value : 'test-value2' } ,
193
192
] )
194
193
) ;
195
194
} finally {
@@ -216,9 +215,7 @@ if (RUN_INTEGRATION_TESTS) {
216
215
searchAttributes : {
217
216
CustomKeywordField : [ 'test-value2' ] ,
218
217
} ,
219
- typedSearchAttributes : new TypedSearchAttributes ( [
220
- { key : { name : 'CustomIntField' , type : SearchAttributeType . INT } , value : 42 } ,
221
- ] ) ,
218
+ typedSearchAttributes : new TypedSearchAttributes ( [ { key : defaultSAKeys . CustomIntField , value : 42 } ] ) ,
222
219
} ,
223
220
} ) ;
224
221
@@ -237,8 +234,8 @@ if (RUN_INTEGRATION_TESTS) {
237
234
t . deepEqual (
238
235
describedSchedule . action . typedSearchAttributes ,
239
236
new TypedSearchAttributes ( [
240
- { key : { name : 'CustomIntField' , type : SearchAttributeType . INT } , value : 42 } ,
241
- { key : { name : 'CustomKeywordField' , type : SearchAttributeType . KEYWORD } , value : 'test-value2' } ,
237
+ { key : defaultSAKeys . CustomIntField , value : 42 } ,
238
+ { key : defaultSAKeys . CustomKeywordField , value : 'test-value2' } ,
242
239
] )
243
240
) ;
244
241
} finally {
@@ -351,9 +348,7 @@ if (RUN_INTEGRATION_TESTS) {
351
348
searchAttributes : {
352
349
CustomKeywordField : [ 'test-value2' ] ,
353
350
} ,
354
- typedSearchAttributes : new TypedSearchAttributes ( [
355
- { key : { name : 'CustomIntField' , type : SearchAttributeType . INT } , value : 42 } ,
356
- ] ) ,
351
+ typedSearchAttributes : new TypedSearchAttributes ( [ { key : defaultSAKeys . CustomIntField , value : 42 } ] ) ,
357
352
} ,
358
353
} ) ;
359
354
@@ -598,9 +593,7 @@ if (RUN_INTEGRATION_TESTS) {
598
593
taskQueue,
599
594
} ,
600
595
searchAttributes,
601
- typedSearchAttributes : new TypedSearchAttributes ( [
602
- { key : { name : 'CustomIntField' , type : SearchAttributeType . INT } , value : 42 } ,
603
- ] ) ,
596
+ typedSearchAttributes : new TypedSearchAttributes ( [ { key : defaultSAKeys . CustomIntField , value : 42 } ] ) ,
604
597
} )
605
598
) ;
606
599
}
0 commit comments