Skip to content

chore: various gherkin improvements for e2e tests #1008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 9 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
16 changes: 8 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
path = libs/providers/flagd-web/schemas
url = https://github.com/open-feature/schemas
[submodule "libs/providers/flagd/spec"]
path = libs/providers/flagd/spec
url = https://github.com/open-feature/spec.git
[submodule "libs/providers/flagd-web/spec"]
path = libs/providers/flagd-web/spec
url = https://github.com/open-feature/spec.git
path = libs/providers/flagd/spec
url = https://github.com/open-feature/spec.git
[submodule "libs/shared/flagd-core/flagd-schemas"]
path = libs/shared/flagd-core/flagd-schemas
url = https://github.com/open-feature/flagd-schemas.git
[submodule "libs/providers/flagd/flagd-testbed"]
path = libs/providers/flagd/flagd-testbed
url = https://github.com/open-feature/flagd-testbed.git
[submodule "libs/shared/flagd-core/test-harness"]
path = libs/shared/flagd-core/test-harness
url = https://github.com/open-feature/flagd-testbed
[submodule "libs/shared/flagd-core/spec"]
path = libs/shared/flagd-core/spec
url = https://github.com/open-feature/spec
16 changes: 2 additions & 14 deletions libs/providers/flagd-web/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,11 @@
}
]
},
"pullTestHarness": {
"executor": "nx:run-commands",
"options": {
"commands": [
"git submodule update --init spec",
"rm -f -r ./src/e2e/features/*",
"cp -v ./spec/specification/assets/gherkin/evaluation.feature ./src/e2e/features/"
],
"cwd": "libs/providers/flagd-web",
"parallel": false
}
},
"e2e": {
"executor": "nx:run-commands",
"options": {
"commands": [
"npx jest"
"npx jest --detectOpenHandles --runInBand"
],
"cwd": "libs/providers/flagd-web/src/e2e",
"parallel": false
Expand All @@ -84,7 +72,7 @@
"target": "generate"
},
{
"target": "pullTestHarness"
"target": "flagd-core:pullTestHarness"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion libs/providers/flagd-web/schemas
1 change: 0 additions & 1 deletion libs/providers/flagd-web/spec
Submodule spec deleted from eaa44d
4 changes: 3 additions & 1 deletion libs/providers/flagd-web/src/e2e/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { getGherkinTestPath } from '@openfeature/flagd-core';

export const FLAGD_NAME = 'flagd-web';

export const IMAGE_VERSION = 'v0.5.6';
export const GHERKIN_EVALUATION_FEATURE = getGherkinTestPath('flagd.feature');
1 change: 0 additions & 1 deletion libs/providers/flagd-web/src/e2e/features/.gitignore

This file was deleted.

Empty file.
2 changes: 2 additions & 0 deletions libs/providers/flagd-web/src/e2e/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './constants';
export * from './step-definitions';
1 change: 1 addition & 0 deletions libs/providers/flagd-web/src/e2e/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: './tsconfig.lib.json' }],
},
moduleNameMapper: {
'@openfeature/flagd-core': ['<rootDir>/../../../../shared/flagd-core/src'],
'^(.*)\\.js$': ['$1.js', '$1.ts', '$1'],
},
testEnvironment: 'node',
Expand Down
Loading