Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions libs/providers/flagd/src/e2e/step-definitions/flagSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,13 @@ export const flagSteps: Steps =
});

then('the resolved metadata should contain', (table) => {
// TODO: implement metadata tests, https://github.com/open-feature/js-sdk-contrib/issues/1290
table.forEach((row: { key: string; metadata_type: string; value: string }) => {
const expectedValue = mapValueToType(row.value, row.metadata_type);
expect(state.details?.flagMetadata).toHaveProperty(row.key, expectedValue);
});
});

then('the resolved metadata is empty', () => {
// TODO: implement metadata tests, https://github.com/open-feature/js-sdk-contrib/issues/1290
expect(state.details?.flagMetadata).toEqual({});
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ export const providerSteps: Steps =
flagdOptions['port'] = container.getPort(state.resolverType);
type = 'sync-payload';
break;
case 'metadata':
flagdOptions['port'] = container.getPort(state.resolverType);
type = 'metadata';
break;
default:
throw new Error('unknown provider type: ' + providerType);
}
Expand Down
2 changes: 1 addition & 1 deletion libs/providers/flagd/src/e2e/tests/in-process.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('in-process', () => {
// remove filters as we add support for features
// see: https://github.com/open-feature/js-sdk-contrib/issues/1096 and child issues
tagFilter:
'@in-process and not @targetURI and not @forbidden and not @events and not @sync and not @grace and not @metadata and not @unixsocket',
'@in-process and not @targetURI and not @forbidden and not @events and not @sync and not @grace and not @unixsocket',
scenarioNameTemplate: (vars) => {
return `${vars.scenarioTitle} (${vars.scenarioTags.join(',')} ${vars.featureTags.join(',')})`;
},
Expand Down
2 changes: 1 addition & 1 deletion libs/providers/flagd/src/e2e/tests/rpc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('rpc', () => {
tagFilter:
// remove filters as we add support for features
// see: https://github.com/open-feature/js-sdk-contrib/issues/1096 and child issues
'@rpc and not @targetURI and not @forbidden and not @events and not @stream and not @grace and not @metadata and not @caching and not @unixsocket',
'@rpc and not @targetURI and not @forbidden and not @events and not @stream and not @grace and not @caching and not @unixsocket',
scenarioNameTemplate: (vars) => {
return `${vars.scenarioTitle} (${vars.scenarioTags.join(',')} ${vars.featureTags.join(',')})`;
},
Expand Down