File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed
libs/providers/flagd/src/e2e Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -73,10 +73,13 @@ export const flagSteps: Steps =
7373 } ) ;
7474
7575 then ( 'the resolved metadata should contain' , ( table ) => {
76- // TODO: implement metadata tests, https://github.com/open-feature/js-sdk-contrib/issues/1290
76+ table . forEach ( ( row : { key : string ; metadata_type : string ; value : string } ) => {
77+ const expectedValue = mapValueToType ( row . value , row . metadata_type ) ;
78+ expect ( state . details ?. flagMetadata ) . toHaveProperty ( row . key , expectedValue ) ;
79+ } ) ;
7780 } ) ;
7881
7982 then ( 'the resolved metadata is empty' , ( ) => {
80- // TODO: implement metadata tests, https://github.com/open-feature/js-sdk-contrib/issues/1290
83+ expect ( state . details ?. flagMetadata ) . toEqual ( { } ) ;
8184 } ) ;
8285 } ;
Original file line number Diff line number Diff line change @@ -73,6 +73,10 @@ export const providerSteps: Steps =
7373 flagdOptions [ 'port' ] = container . getPort ( state . resolverType ) ;
7474 type = 'sync-payload' ;
7575 break ;
76+ case 'metadata' :
77+ flagdOptions [ 'port' ] = container . getPort ( state . resolverType ) ;
78+ type = 'metadata' ;
79+ break ;
7680 default :
7781 throw new Error ( 'unknown provider type: ' + providerType ) ;
7882 }
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ describe('in-process', () => {
2323 loadFeatures ( GHERKIN_FLAGD , {
2424 // remove filters as we add support for features
2525 // see: https://github.com/open-feature/js-sdk-contrib/issues/1096 and child issues
26- tagFilter : '@in-process and not @targetURI and not @sync and not @metadata and not @ unixsocket' ,
26+ tagFilter : '@in-process and not @targetURI and not @sync and not @unixsocket' ,
2727 scenarioNameTemplate : ( vars ) => {
2828 return `${ vars . scenarioTitle } (${ vars . scenarioTags . join ( ',' ) } ${ vars . featureTags . join ( ',' ) } )` ;
2929 } ,
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ describe('rpc', () => {
2424 tagFilter :
2525 // remove filters as we add support for features
2626 // see: https://github.com/open-feature/js-sdk-contrib/issues/1096 and child issues
27- '@rpc and not @targetURI and not @metadata and not @ caching and not @unixsocket' ,
27+ '@rpc and not @targetURI and not @caching and not @unixsocket' ,
2828 scenarioNameTemplate : ( vars ) => {
2929 return `${ vars . scenarioTitle } (${ vars . scenarioTags . join ( ',' ) } ${ vars . featureTags . join ( ',' ) } )` ;
3030 } ,
You can’t perform that action at this time.
0 commit comments