diff --git a/src/lib/middleware/rbac-middleware.test.ts b/src/lib/middleware/rbac-middleware.test.ts index ebbe56b994..e975f40fb0 100644 --- a/src/lib/middleware/rbac-middleware.test.ts +++ b/src/lib/middleware/rbac-middleware.test.ts @@ -279,9 +279,9 @@ test('should lookup projectId from params', async () => { ); }); -test('should lookup projectId from feature toggle', async () => { +test('should lookup projectId from feature flag', async () => { const projectId = 'some-project-33'; - const featureName = 'some-feature-toggle'; + const featureName = 'some-feature-flag'; const accessService = { hasPermission: jest.fn(), @@ -320,7 +320,7 @@ test('should lookup projectId from feature toggle', async () => { test('should lookup projectId from data', async () => { const projectId = 'some-project-33'; - const featureName = 'some-feature-toggle'; + const featureName = 'some-feature-flag'; const accessService = { hasPermission: jest.fn(), @@ -357,9 +357,9 @@ test('should lookup projectId from data', async () => { ); }); -test('Does not double check permission if not changing project when updating toggle', async () => { +test('Does not double check permission if not changing project when updating flag', async () => { const oldProjectId = 'some-project-34'; - const featureName = 'some-feature-toggle'; + const featureName = 'some-feature-flag'; const accessService = { hasPermission: jest.fn().mockReturnValue(true), }; diff --git a/src/lib/openapi/spec/admin-features-query-schema.ts b/src/lib/openapi/spec/admin-features-query-schema.ts index 2e796ee63c..929dc90fb0 100644 --- a/src/lib/openapi/spec/admin-features-query-schema.ts +++ b/src/lib/openapi/spec/admin-features-query-schema.ts @@ -20,7 +20,7 @@ export const adminFeaturesQuerySchema = { namePrefix: { type: 'string', description: - 'A case-insensitive prefix filter for the names of feature toggles', + 'A case-insensitive prefix filter for the names of feature flags', example: 'demo.part1', }, }, diff --git a/src/lib/openapi/spec/advanced-playground-environment-feature-schema.ts b/src/lib/openapi/spec/advanced-playground-environment-feature-schema.ts index 04c2aeadb8..37365923bb 100644 --- a/src/lib/openapi/spec/advanced-playground-environment-feature-schema.ts +++ b/src/lib/openapi/spec/advanced-playground-environment-feature-schema.ts @@ -14,7 +14,7 @@ import { sdkFlatContextSchema } from './sdk-flat-context-schema'; export const advancedPlaygroundEnvironmentFeatureSchema = { $id: '#/components/schemas/advancedPlaygroundEnvironmentFeatureSchema', description: - 'A simplified feature toggle model intended for the Unleash playground.', + 'A simplified feature flag model intended for the Unleash playground.', type: 'object', additionalProperties: false, required: [ @@ -40,7 +40,7 @@ export const advancedPlaygroundEnvironmentFeatureSchema = { description: "The feature's environment.", }, context: { - description: 'The context to use when evaluating toggles', + description: 'The context to use when evaluating flags', $ref: sdkFlatContextSchema.$id, }, projectId: { @@ -102,7 +102,7 @@ export const advancedPlaygroundEnvironmentFeatureSchema = { name: { type: 'string', description: - "The variant's name. If there is no variant or if the toggle is disabled, this will be `disabled`", + "The variant's name. If there is no variant or if the flag is disabled, this will be `disabled`", example: 'red-variant', }, enabled: { diff --git a/src/lib/openapi/spec/advanced-playground-feature-schema.ts b/src/lib/openapi/spec/advanced-playground-feature-schema.ts index f907470df9..8795469928 100644 --- a/src/lib/openapi/spec/advanced-playground-feature-schema.ts +++ b/src/lib/openapi/spec/advanced-playground-feature-schema.ts @@ -12,7 +12,7 @@ import { sdkFlatContextSchema } from './sdk-flat-context-schema'; export const advancedPlaygroundFeatureSchema = { $id: '#/components/schemas/advancedPlaygroundFeatureSchema', description: - 'A simplified feature toggle model intended for the Unleash playground.', + 'A simplified feature flag model intended for the Unleash playground.', type: 'object', additionalProperties: false, required: ['name', 'projectId', 'environments'], diff --git a/src/lib/openapi/spec/batch-features-schema.ts b/src/lib/openapi/spec/batch-features-schema.ts index 55d9cef17a..f16e1625e2 100644 --- a/src/lib/openapi/spec/batch-features-schema.ts +++ b/src/lib/openapi/spec/batch-features-schema.ts @@ -3,7 +3,7 @@ import type { FromSchema } from 'json-schema-to-ts'; export const batchFeaturesSchema = { $id: '#/components/schemas/batchFeaturesSchema', type: 'object', - description: 'A list of feature toggle names for batch operations', + description: 'A list of feature flag names for batch operations', required: ['features'], properties: { features: { @@ -11,7 +11,7 @@ export const batchFeaturesSchema = { items: { type: 'string', }, - description: 'List of feature toggle names', + description: 'List of feature flag names', example: ['my-feature-4', 'my-feature-5', 'my-feature-6'], }, }, diff --git a/src/lib/openapi/spec/client-feature-schema.ts b/src/lib/openapi/spec/client-feature-schema.ts index c294d59b44..981b4e81eb 100644 --- a/src/lib/openapi/spec/client-feature-schema.ts +++ b/src/lib/openapi/spec/client-feature-schema.ts @@ -12,24 +12,24 @@ export const clientFeatureSchema = { type: 'object', required: ['name', 'enabled'], description: - 'Feature toggle configuration used by SDKs to evaluate state of a toggle', + 'Feature flag configuration used by SDKs to evaluate state of a flag', additionalProperties: false, properties: { name: { type: 'string', description: - 'The unique name of a feature toggle. Is validated to be URL safe on creation', + 'The unique name of a feature flag. Is validated to be URL safe on creation', example: 'new.payment.flow.stripe', }, type: { type: 'string', description: - 'What kind of feature flag is this. Refer to the documentation on [feature toggle types](https://docs.getunleash.io/reference/feature-toggle-types) for more information', + 'What kind of feature flag is this. Refer to the documentation on [feature flag types](https://docs.getunleash.io/reference/feature-toggle-types) for more information', example: 'release', }, description: { type: 'string', - description: 'A description of the toggle', + description: 'A description of the flag', nullable: true, example: 'No variants here', }, @@ -41,26 +41,26 @@ export const clientFeatureSchema = { }, stale: { description: - 'If this is true Unleash believes this feature toggle has been active longer than Unleash expects a toggle of this type to be active', + 'If this is true Unleash believes this feature flag has been active longer than Unleash expects a flag of this type to be active', type: 'boolean', example: false, }, impressionData: { description: - 'Set to true if SDKs should trigger [impression events](https://docs.getunleash.io/reference/impression-data) when this toggle is evaluated', + 'Set to true if SDKs should trigger [impression events](https://docs.getunleash.io/reference/impression-data) when this flag is evaluated', type: 'boolean', nullable: true, example: false, }, project: { - description: 'Which project this feature toggle belongs to', + description: 'Which project this feature flag belongs to', type: 'string', example: 'new.payment.flow', }, strategies: { type: 'array', description: - 'Evaluation strategies for this toggle. Each entry in this list will be evaluated and ORed together', + 'Evaluation strategies for this flag. Each entry in this list will be evaluated and ORed together', items: { $ref: '#/components/schemas/featureStrategySchema', }, @@ -68,7 +68,7 @@ export const clientFeatureSchema = { variants: { type: 'array', description: - '[Variants](https://docs.getunleash.io/reference/feature-toggle-variants#what-are-variants) configured for this toggle', + '[Variants](https://docs.getunleash.io/reference/feature-toggle-variants#what-are-variants) configured for this flag', items: { $ref: '#/components/schemas/variantSchema', }, @@ -76,7 +76,7 @@ export const clientFeatureSchema = { }, dependencies: { type: 'array', - description: 'Feature dependencies for this toggle', + description: 'Feature dependencies for this flag', items: { $ref: '#/components/schemas/dependentFeatureSchema', }, diff --git a/src/lib/openapi/spec/client-features-query-schema.ts b/src/lib/openapi/spec/client-features-query-schema.ts index 9773673a09..f71a28a6d3 100644 --- a/src/lib/openapi/spec/client-features-query-schema.ts +++ b/src/lib/openapi/spec/client-features-query-schema.ts @@ -36,7 +36,7 @@ export const clientFeaturesQuerySchema = { environment: { type: 'string', description: - 'Strategies for the feature toggle configured for this environment are included. (DEPRECATED) - Handled by API tokens', + 'Strategies for the feature flag configured for this environment are included. (DEPRECATED) - Handled by API tokens', deprecated: true, }, inlineSegmentConstraints: { diff --git a/src/lib/openapi/spec/client-features-schema.ts b/src/lib/openapi/spec/client-features-schema.ts index 767788198c..af23bb1189 100644 --- a/src/lib/openapi/spec/client-features-schema.ts +++ b/src/lib/openapi/spec/client-features-schema.ts @@ -26,7 +26,7 @@ export const clientFeaturesSchema = { minimum: 0, }, features: { - description: 'A list of feature toggles with their configuration', + description: 'A list of feature flags with their configuration', type: 'array', items: { $ref: '#/components/schemas/clientFeatureSchema', diff --git a/src/lib/openapi/spec/create-feature-schema.ts b/src/lib/openapi/spec/create-feature-schema.ts index a342a31370..25b85f699d 100644 --- a/src/lib/openapi/spec/create-feature-schema.ts +++ b/src/lib/openapi/spec/create-feature-schema.ts @@ -3,7 +3,7 @@ import type { FromSchema } from 'json-schema-to-ts'; export const createFeatureSchema = { $id: '#/components/schemas/createFeatureSchema', type: 'object', - description: 'Data used to create a new feature toggle.', + description: 'Data used to create a new feature flag.', required: ['name'], properties: { name: { @@ -15,7 +15,7 @@ export const createFeatureSchema = { type: 'string', example: 'release', description: - "The feature toggle's [type](https://docs.getunleash.io/reference/feature-toggle-types). One of experiment, kill-switch, release, operational, or permission", + "The feature flag's [type](https://docs.getunleash.io/reference/feature-toggle-types). One of experiment, kill-switch, release, operational, or permission", }, description: { type: 'string', diff --git a/src/lib/openapi/spec/create-strategy-variant-schema.ts b/src/lib/openapi/spec/create-strategy-variant-schema.ts index 49e786e8a1..aa4fa32255 100644 --- a/src/lib/openapi/spec/create-strategy-variant-schema.ts +++ b/src/lib/openapi/spec/create-strategy-variant-schema.ts @@ -10,7 +10,7 @@ export const createStrategyVariantSchema = { name: { type: 'string', description: - 'The variant name. Must be unique for this feature toggle', + 'The variant name. Must be unique for this feature flag', example: 'blue_group', }, weight: { diff --git a/src/lib/openapi/spec/dora-features-schema.ts b/src/lib/openapi/spec/dora-features-schema.ts index 49ce96bb1d..61040299a3 100644 --- a/src/lib/openapi/spec/dora-features-schema.ts +++ b/src/lib/openapi/spec/dora-features-schema.ts @@ -10,12 +10,12 @@ export const doraFeaturesSchema = { properties: { name: { type: 'string', - description: 'The name of a feature toggle', + description: 'The name of a feature flag', }, timeToProduction: { type: 'number', description: - 'The average number of days it takes a feature toggle to get into production', + 'The average number of days it takes a feature flag to get into production', }, }, components: {}, diff --git a/src/lib/openapi/spec/event-schema.ts b/src/lib/openapi/spec/event-schema.ts index 1355a7dc9a..756d875277 100644 --- a/src/lib/openapi/spec/event-schema.ts +++ b/src/lib/openapi/spec/event-schema.ts @@ -8,10 +8,10 @@ const eventDataSchema = { nullable: true, 'x-enforcer-exception-skip-codes': 'WSCH006', // allow additional properties in example (openapi enforcer) description: - 'Extra associated data related to the event, such as feature toggle state, segment configuration, etc., if applicable.', + 'Extra associated data related to the event, such as feature flag state, segment configuration, etc., if applicable.', example: { name: 'new-feature', - description: 'Toggle description', + description: 'Flag description', type: 'release', project: 'my-project', stale: false, @@ -61,7 +61,7 @@ export const eventSchema = { environment: { type: 'string', description: - 'The feature toggle environment the event relates to, if applicable.', + 'The feature flag environment the event relates to, if applicable.', nullable: true, example: 'development', }, @@ -75,7 +75,7 @@ export const eventSchema = { type: 'string', nullable: true, description: - 'The name of the feature toggle the event relates to, if applicable.', + 'The name of the feature flag the event relates to, if applicable.', example: 'my.first.feature', }, data: eventDataSchema, diff --git a/src/lib/openapi/spec/export-query-parameters.ts b/src/lib/openapi/spec/export-query-parameters.ts index fe835d227f..ac8a2fd537 100644 --- a/src/lib/openapi/spec/export-query-parameters.ts +++ b/src/lib/openapi/spec/export-query-parameters.ts @@ -70,7 +70,7 @@ export const exportQueryParameters = [ default: true, }, description: - 'Whether feature toggles should be included in the exported data.', + 'Whether feature flags should be included in the exported data.', in: 'query', }, { diff --git a/src/lib/openapi/spec/export-result-schema.ts b/src/lib/openapi/spec/export-result-schema.ts index fedc8593b8..e1510fbe2d 100644 --- a/src/lib/openapi/spec/export-result-schema.ts +++ b/src/lib/openapi/spec/export-result-schema.ts @@ -20,7 +20,7 @@ export const exportResultSchema = { type: 'object', additionalProperties: false, description: - 'The result of the export operation, providing you with the feature toggle definitions, strategy definitions and the rest of the elements relevant to the features (tags, environments etc.)', + 'The result of the export operation, providing you with the feature flag definitions, strategy definitions and the rest of the elements relevant to the features (tags, environments etc.)', required: ['features', 'featureStrategies', 'tagTypes'], properties: { features: { diff --git a/src/lib/openapi/spec/feature-events-schema.ts b/src/lib/openapi/spec/feature-events-schema.ts index ab0f512a76..815c23af9c 100644 --- a/src/lib/openapi/spec/feature-events-schema.ts +++ b/src/lib/openapi/spec/feature-events-schema.ts @@ -7,7 +7,7 @@ export const featureEventsSchema = { type: 'object', additionalProperties: false, required: ['events'], - description: 'One or more events happening to a specific feature toggle', + description: 'One or more events happening to a specific feature flag', properties: { version: { type: 'integer', @@ -17,10 +17,9 @@ export const featureEventsSchema = { example: 1, }, toggleName: { - description: - 'The name of the feature toggle these events relate to', + description: 'The name of the feature flag these events relate to', type: 'string', - example: 'my.first.feature.toggle', + example: 'my.first.feature.flag', }, events: { description: 'The list of events', @@ -28,7 +27,7 @@ export const featureEventsSchema = { items: { $ref: eventSchema.$id }, }, totalEvents: { - description: 'How many events are there for this feature toggle', + description: 'How many events are there for this feature flag', type: 'integer', minimum: 0, example: 13, diff --git a/src/lib/openapi/spec/feature-schema.ts b/src/lib/openapi/spec/feature-schema.ts index b936776203..dfd134bf48 100644 --- a/src/lib/openapi/spec/feature-schema.ts +++ b/src/lib/openapi/spec/feature-schema.ts @@ -13,7 +13,7 @@ export const featureSchema = { type: 'object', additionalProperties: false, required: ['name'], - description: 'A feature toggle definition', + description: 'A feature flag definition', properties: { name: { type: 'string', @@ -24,7 +24,7 @@ export const featureSchema = { type: 'string', example: 'kill-switch', description: - 'Type of the toggle e.g. experiment, kill-switch, release, operational, permission', + 'Type of the flag e.g. experiment, kill-switch, release, operational, permission', }, description: { type: 'string', diff --git a/src/lib/openapi/spec/feature-search-response-schema.ts b/src/lib/openapi/spec/feature-search-response-schema.ts index 8c125a6411..8897c9c38e 100644 --- a/src/lib/openapi/spec/feature-search-response-schema.ts +++ b/src/lib/openapi/spec/feature-search-response-schema.ts @@ -24,7 +24,7 @@ export const featureSearchResponseSchema = { 'environments', 'segments', ], - description: 'A feature toggle definition', + description: 'A feature flag definition', properties: { name: { type: 'string', @@ -35,7 +35,7 @@ export const featureSearchResponseSchema = { type: 'string', example: 'kill-switch', description: - 'Type of the toggle e.g. experiment, kill-switch, release, operational, permission', + 'Type of the flag e.g. experiment, kill-switch, release, operational, permission', }, description: { type: 'string', diff --git a/src/lib/openapi/spec/feature-type-schema.ts b/src/lib/openapi/spec/feature-type-schema.ts index 19c7d514de..504bba72aa 100644 --- a/src/lib/openapi/spec/feature-type-schema.ts +++ b/src/lib/openapi/spec/feature-type-schema.ts @@ -4,32 +4,32 @@ export const featureTypeSchema = { $id: '#/components/schemas/featureTypeSchema', type: 'object', description: - 'A [feature toggle type](https://docs.getunleash.io/reference/feature-toggle-types).', + 'A [feature flag type](https://docs.getunleash.io/reference/feature-toggle-types).', additionalProperties: false, required: ['id', 'name', 'description', 'lifetimeDays'], properties: { id: { type: 'string', - description: 'The identifier of this feature toggle type.', + description: 'The identifier of this feature flag type.', example: 'kill-switch', }, name: { type: 'string', - description: 'The display name of this feature toggle type.', + description: 'The display name of this feature flag type.', example: 'Kill switch', }, description: { type: 'string', description: - 'A description of what this feature toggle type is intended to be used for.', + 'A description of what this feature flag type is intended to be used for.', example: - 'Kill switch feature toggles are used to quickly turn on or off critical functionality in your system.', + 'Kill switch feature flags are used to quickly turn on or off critical functionality in your system.', }, lifetimeDays: { type: 'integer', minimum: 0, description: - 'How many days it takes before a feature toggle of this typed is flagged as [potentially stale](https://docs.getunleash.io/reference/technical-debt#stale-and-potentially-stale-toggles) by Unleash. If this value is `null`, Unleash will never mark it as potentially stale.', + 'How many days it takes before a feature flag of this typed is flagged as [potentially stale](https://docs.getunleash.io/reference/technical-debt#stale-and-potentially-stale-toggles) by Unleash. If this value is `null`, Unleash will never mark it as potentially stale.', example: 40, nullable: true, }, diff --git a/src/lib/openapi/spec/feature-types-schema.ts b/src/lib/openapi/spec/feature-types-schema.ts index 633cfd6793..9fa17d9069 100644 --- a/src/lib/openapi/spec/feature-types-schema.ts +++ b/src/lib/openapi/spec/feature-types-schema.ts @@ -6,7 +6,7 @@ export const featureTypesSchema = { type: 'object', additionalProperties: false, description: - 'A list of [feature toggle types](https://docs.getunleash.io/reference/feature-toggle-types) and the schema version used to represent those feature types.', + 'A list of [feature flag types](https://docs.getunleash.io/reference/feature-toggle-types) and the schema version used to represent those feature types.', required: ['version', 'types'], properties: { version: { @@ -14,11 +14,11 @@ export const featureTypesSchema = { enum: [1], example: 1, description: - 'The schema version used to describe the feature toggle types listed in the `types` property.', + 'The schema version used to describe the feature flag types listed in the `types` property.', }, types: { type: 'array', - description: 'The list of feature toggle types.', + description: 'The list of feature flag types.', items: { $ref: '#/components/schemas/featureTypeSchema', }, @@ -27,35 +27,35 @@ export const featureTypesSchema = { id: 'release', name: 'Release', description: - 'Release feature toggles are used to release new features.', + 'Release feature flags are used to release new features.', lifetimeDays: 40, }, { id: 'experiment', name: 'Experiment', description: - 'Experiment feature toggles are used to test and verify multiple different versions of a feature.', + 'Experiment feature flags are used to test and verify multiple different versions of a feature.', lifetimeDays: 40, }, { id: 'operational', name: 'Operational', description: - 'Operational feature toggles are used to control aspects of a rollout.', + 'Operational feature flags are used to control aspects of a rollout.', lifetimeDays: 7, }, { id: 'kill-switch', name: 'Kill switch', description: - 'Kill switch feature toggles are used to quickly turn on or off critical functionality in your system.', + 'Kill switch feature flags are used to quickly turn on or off critical functionality in your system.', lifetimeDays: null, }, { id: 'permission', name: 'Permission', description: - 'Permission feature toggles are used to control permissions in your system.', + 'Permission feature flags are used to control permissions in your system.', lifetimeDays: null, }, ], diff --git a/src/lib/openapi/spec/feature-usage-schema.ts b/src/lib/openapi/spec/feature-usage-schema.ts index 300a68f96f..8f9fcb79a0 100644 --- a/src/lib/openapi/spec/feature-usage-schema.ts +++ b/src/lib/openapi/spec/feature-usage-schema.ts @@ -7,7 +7,7 @@ export const featureUsageSchema = { type: 'object', additionalProperties: false, description: - 'How many applications have seen this feature toggle, as well as how this feature was evaluated the last hour', + 'How many applications have seen this feature flag, as well as how this feature was evaluated the last hour', required: [ 'version', 'maturity', diff --git a/src/lib/openapi/spec/feature-variants-schema.ts b/src/lib/openapi/spec/feature-variants-schema.ts index 2e0cd4cc05..e1b1b11459 100644 --- a/src/lib/openapi/spec/feature-variants-schema.ts +++ b/src/lib/openapi/spec/feature-variants-schema.ts @@ -7,7 +7,7 @@ export const featureVariantsSchema = { type: 'object', additionalProperties: false, required: ['version', 'variants'], - description: 'A versioned collection of feature toggle variants.', + description: 'A versioned collection of feature flag variants.', properties: { version: { type: 'integer', @@ -19,7 +19,7 @@ export const featureVariantsSchema = { items: { $ref: '#/components/schemas/variantSchema', }, - description: 'All variants defined for a specific feature toggle.', + description: 'All variants defined for a specific feature flag.', }, }, components: { diff --git a/src/lib/openapi/spec/frontend-api-feature-schema.ts b/src/lib/openapi/spec/frontend-api-feature-schema.ts index ee1896248f..0f9f672f14 100644 --- a/src/lib/openapi/spec/frontend-api-feature-schema.ts +++ b/src/lib/openapi/spec/frontend-api-feature-schema.ts @@ -32,7 +32,7 @@ export const frontendApiFeatureSchema = { name: { type: 'string', description: - 'The variants name. Is unique for this feature toggle', + 'The variants name. Is unique for this feature flag', example: 'blue_group', }, enabled: { diff --git a/src/lib/openapi/spec/health-report-schema.ts b/src/lib/openapi/spec/health-report-schema.ts index 76065b03b9..d4ce0ee291 100644 --- a/src/lib/openapi/spec/health-report-schema.ts +++ b/src/lib/openapi/spec/health-report-schema.ts @@ -5,7 +5,7 @@ export const healthReportSchema = { ...healthOverviewSchema, $id: '#/components/schemas/healthReportSchema', description: - 'A report of the current health of the requested project, with datapoints like counters of currently active, stale, and potentially stale feature toggles.', + 'A report of the current health of the requested project, with datapoints like counters of currently active, stale, and potentially stale feature flags.', required: [ ...healthOverviewSchema.required, 'potentiallyStaleCount', @@ -16,17 +16,17 @@ export const healthReportSchema = { ...healthOverviewSchema.properties, potentiallyStaleCount: { type: 'number', - description: 'The number of potentially stale feature toggles.', + description: 'The number of potentially stale feature flags.', example: 5, }, activeCount: { type: 'number', - description: 'The number of active feature toggles.', + description: 'The number of active feature flags.', example: 2, }, staleCount: { type: 'number', - description: 'The number of stale feature toggles.', + description: 'The number of stale feature flags.', example: 10, }, }, diff --git a/src/lib/openapi/spec/import-toggles-validate-item-schema.ts b/src/lib/openapi/spec/import-toggles-validate-item-schema.ts index 22115e226b..65e53a7273 100644 --- a/src/lib/openapi/spec/import-toggles-validate-item-schema.ts +++ b/src/lib/openapi/spec/import-toggles-validate-item-schema.ts @@ -6,7 +6,7 @@ export const importTogglesValidateItemSchema = { required: ['message', 'affectedItems'], additionalProperties: false, description: - 'A description of an error or warning pertaining to a feature toggle import job.', + 'A description of an error or warning pertaining to a feature flag import job.', properties: { message: { type: 'string', diff --git a/src/lib/openapi/spec/playground-feature-schema.ts b/src/lib/openapi/spec/playground-feature-schema.ts index b66bfc817d..3959f86d12 100644 --- a/src/lib/openapi/spec/playground-feature-schema.ts +++ b/src/lib/openapi/spec/playground-feature-schema.ts @@ -14,7 +14,7 @@ export const unknownFeatureEvaluationResult = 'unevaluated' as const; export const playgroundFeatureSchema = { $id: '#/components/schemas/playgroundFeatureSchema', description: - 'A simplified feature toggle model intended for the Unleash playground.', + 'A simplified feature flag model intended for the Unleash playground.', type: 'object', additionalProperties: false, required: [ @@ -96,7 +96,7 @@ export const playgroundFeatureSchema = { name: { type: 'string', description: - "The variant's name. If there is no variant or if the toggle is disabled, this will be `disabled`", + "The variant's name. If there is no variant or if the flag is disabled, this will be `disabled`", example: 'red-variant', }, enabled: { diff --git a/src/lib/openapi/spec/playground-strategy-schema.ts b/src/lib/openapi/spec/playground-strategy-schema.ts index 49c0eeeb7c..c907fd51b1 100644 --- a/src/lib/openapi/spec/playground-strategy-schema.ts +++ b/src/lib/openapi/spec/playground-strategy-schema.ts @@ -114,8 +114,7 @@ export const strategyEvaluationResults = { export const playgroundStrategySchema = { $id: '#/components/schemas/playgroundStrategySchema', type: 'object', - description: - 'An evaluated feature toggle strategy as used by the Playground', + description: 'An evaluated feature flag strategy as used by the Playground', additionalProperties: false, required: [ 'id', diff --git a/src/lib/openapi/spec/project-dora-metrics-schema.ts b/src/lib/openapi/spec/project-dora-metrics-schema.ts index e30ffaca26..23544453d4 100644 --- a/src/lib/openapi/spec/project-dora-metrics-schema.ts +++ b/src/lib/openapi/spec/project-dora-metrics-schema.ts @@ -11,13 +11,13 @@ export const projectDoraMetricsSchema = { projectAverage: { type: 'number', description: - 'The average time it takes a feature toggle to be enabled in production. The measurement unit is days.', + 'The average time it takes a feature flag to be enabled in production. The measurement unit is days.', }, features: { type: 'array', items: { $ref: '#/components/schemas/doraFeaturesSchema' }, description: - 'An array of objects containing feature toggle name and timeToProduction values. The measurement unit of timeToProduction is days.', + 'An array of objects containing feature flag name and timeToProduction values. The measurement unit of timeToProduction is days.', }, }, components: { diff --git a/src/lib/openapi/spec/project-insights-schema.ts b/src/lib/openapi/spec/project-insights-schema.ts index f6f97705f3..10f24bafa3 100644 --- a/src/lib/openapi/spec/project-insights-schema.ts +++ b/src/lib/openapi/spec/project-insights-schema.ts @@ -33,18 +33,18 @@ export const projectInsightsSchema = { }, activeCount: { type: 'number', - description: 'The number of active feature toggles.', + description: 'The number of active feature flags.', example: 12, }, potentiallyStaleCount: { type: 'number', description: - 'The number of potentially stale feature toggles.', + 'The number of potentially stale feature flags.', example: 5, }, staleCount: { type: 'number', - description: 'The number of stale feature toggles.', + description: 'The number of stale feature flags.', example: 10, }, }, diff --git a/src/lib/openapi/spec/project-stats-schema.ts b/src/lib/openapi/spec/project-stats-schema.ts index 372a6fc21a..0312a1d4a4 100644 --- a/src/lib/openapi/spec/project-stats-schema.ts +++ b/src/lib/openapi/spec/project-stats-schema.ts @@ -30,25 +30,25 @@ Stats are divided into current and previous **windows**. type: 'number', example: 15, description: - 'The number of feature toggles created during the current window', + 'The number of feature flags created during the current window', }, createdPastWindow: { type: 'number', example: 15, description: - 'The number of feature toggles created during the previous window', + 'The number of feature flags created during the previous window', }, archivedCurrentWindow: { type: 'number', example: 5, description: - 'The number of feature toggles that were archived during the current window', + 'The number of feature flags that were archived during the current window', }, archivedPastWindow: { type: 'number', example: 5, description: - 'The number of feature toggles that were archived during the previous window', + 'The number of feature flags that were archived during the previous window', }, projectActivityCurrentWindow: { type: 'number', diff --git a/src/lib/openapi/spec/search-events-schema.ts b/src/lib/openapi/spec/search-events-schema.ts index c3fc469ea4..8d28958c51 100644 --- a/src/lib/openapi/spec/search-events-schema.ts +++ b/src/lib/openapi/spec/search-events-schema.ts @@ -22,8 +22,8 @@ export const searchEventsSchema = { }, feature: { type: 'string', - description: 'Find events by feature toggle name (case-sensitive).', - example: 'my.first.toggle', + description: 'Find events by feature flag name (case-sensitive).', + example: 'my.first.flag', }, query: { type: 'string', diff --git a/src/lib/openapi/spec/ui-config-schema.ts b/src/lib/openapi/spec/ui-config-schema.ts index 10b7d18782..ee8d57140d 100644 --- a/src/lib/openapi/spec/ui-config-schema.ts +++ b/src/lib/openapi/spec/ui-config-schema.ts @@ -14,7 +14,7 @@ export const uiConfigSchema = { slogan: { type: 'string', description: 'The slogan to display in the UI footer.', - example: 'The enterprise-ready feature toggle service.', + example: 'The enterprise-ready feature flag service.', }, name: { type: 'string', diff --git a/src/lib/openapi/spec/update-feature-schema.ts b/src/lib/openapi/spec/update-feature-schema.ts index 77cfdbf1aa..13a0e5a087 100644 --- a/src/lib/openapi/spec/update-feature-schema.ts +++ b/src/lib/openapi/spec/update-feature-schema.ts @@ -4,7 +4,7 @@ import { constraintSchema } from './constraint-schema'; export const updateFeatureSchema = { $id: '#/components/schemas/updateFeatureSchema', type: 'object', - description: 'Data used for updating a feature toggle', + description: 'Data used for updating a feature flag', properties: { description: { type: 'string', @@ -16,7 +16,7 @@ export const updateFeatureSchema = { type: 'string', example: 'kill-switch', description: - 'Type of the toggle e.g. experiment, kill-switch, release, operational, permission', + 'Type of the flag e.g. experiment, kill-switch, release, operational, permission', }, stale: { type: 'boolean', @@ -27,7 +27,7 @@ export const updateFeatureSchema = { type: 'boolean', example: true, description: - 'If `true` the feature toggle will be moved to the [archive](https://docs.getunleash.io/reference/archived-toggles) with a property `archivedAt` set to current time', + 'If `true` the feature flag will be moved to the [archive](https://docs.getunleash.io/reference/archived-toggles) with a property `archivedAt` set to current time', }, impressionData: { type: 'boolean', diff --git a/src/lib/openapi/spec/update-feature-type-lifetime-schema.ts b/src/lib/openapi/spec/update-feature-type-lifetime-schema.ts index 74beb4cf2f..ecdf4aee70 100644 --- a/src/lib/openapi/spec/update-feature-type-lifetime-schema.ts +++ b/src/lib/openapi/spec/update-feature-type-lifetime-schema.ts @@ -5,11 +5,11 @@ export const updateFeatureTypeLifetimeSchema = { type: 'object', required: ['lifetimeDays'], description: - 'Data used when updating the lifetime of a [feature toggle type](https://docs.getunleash.io/reference/feature-toggle-types).', + 'Data used when updating the lifetime of a [feature flag type](https://docs.getunleash.io/reference/feature-toggle-types).', properties: { lifetimeDays: { description: - 'The new lifetime (in days) that you want to assign to the feature toggle type. If the value is `null` or `0`, then the feature toggles of that type will never be marked as potentially stale. Otherwise, they will be considered potentially stale after the number of days indicated by this property.', + 'The new lifetime (in days) that you want to assign to the feature flag type. If the value is `null` or `0`, then the feature flags of that type will never be marked as potentially stale. Otherwise, they will be considered potentially stale after the number of days indicated by this property.', example: 7, type: 'integer', nullable: true, diff --git a/src/lib/openapi/spec/validate-feature-schema.ts b/src/lib/openapi/spec/validate-feature-schema.ts index ce794e8e4c..1c565d1820 100644 --- a/src/lib/openapi/spec/validate-feature-schema.ts +++ b/src/lib/openapi/spec/validate-feature-schema.ts @@ -4,7 +4,7 @@ export const validateFeatureSchema = { $id: '#/components/schemas/validateFeatureSchema', type: 'object', required: ['name'], - description: "Data used to validate a feature toggle's name.", + description: "Data used to validate a feature flag's name.", properties: { name: { description: 'The feature name to validate.', diff --git a/src/lib/openapi/spec/variant-schema.ts b/src/lib/openapi/spec/variant-schema.ts index 88bf2665fa..5ca88f9725 100644 --- a/src/lib/openapi/spec/variant-schema.ts +++ b/src/lib/openapi/spec/variant-schema.ts @@ -11,7 +11,7 @@ export const variantSchema = { properties: { name: { type: 'string', - description: 'The variants name. Is unique for this feature toggle', + description: 'The variants name. Is unique for this feature flag', example: 'blue_group', }, weight: { diff --git a/src/lib/openapi/util/openapi-tags.ts b/src/lib/openapi/util/openapi-tags.ts index 6049b6074f..5bfb5b7909 100644 --- a/src/lib/openapi/util/openapi-tags.ts +++ b/src/lib/openapi/util/openapi-tags.ts @@ -21,13 +21,13 @@ const OPENAPI_TAGS = [ { name: 'Archive', description: - 'Revive or permanently delete [archived feature toggles](https://docs.getunleash.io/advanced/archived_toggles).', + 'Revive or permanently delete [archived feature flags](https://docs.getunleash.io/advanced/archived_toggles).', }, { name: 'Auth', description: 'Manage logins, passwords, etc.' }, { name: 'Banners', description: - 'Create, update, toggle, and delete [banners](https://docs.getunleash.io/reference/banners).', + 'Create, update, flag, and delete [banners](https://docs.getunleash.io/reference/banners).', }, { name: 'Change Requests', @@ -58,12 +58,12 @@ const OPENAPI_TAGS = [ { name: 'Feature Types', description: - 'Manage [feature toggle types](https://docs.getunleash.io/reference/feature-toggle-types).', + 'Manage [feature flag types](https://docs.getunleash.io/reference/feature-toggle-types).', }, { name: 'Features', description: - 'Create, update, and delete [features toggles](https://docs.getunleash.io/reference/feature-toggles).', + 'Create, update, and delete [features flags](https://docs.getunleash.io/reference/feature-toggles).', }, { name: 'Frontend API', @@ -105,8 +105,7 @@ const OPENAPI_TAGS = [ }, { name: 'Playground', - description: - 'Evaluate an Unleash context against your feature toggles.', + description: 'Evaluate an Unleash context against your feature flags.', }, { name: 'Projects', diff --git a/src/lib/routes/admin-api/event.ts b/src/lib/routes/admin-api/event.ts index b6bafb5aed..7f691e1b93 100644 --- a/src/lib/routes/admin-api/event.ts +++ b/src/lib/routes/admin-api/event.ts @@ -88,9 +88,9 @@ export default class EventController extends Controller { 200: createResponseSchema('featureEventsSchema'), }, description: - 'Returns all events related to the specified feature toggle. If the feature toggle does not exist, the list of events will be empty.', + 'Returns all events related to the specified feature flag. If the feature flag does not exist, the list of events will be empty.', summary: - 'Get all events related to a specific feature toggle.', + 'Get all events related to a specific feature flag.', }), ], }); diff --git a/src/lib/routes/admin-api/feature-type.ts b/src/lib/routes/admin-api/feature-type.ts index 424d913fe6..189dfbf2aa 100644 --- a/src/lib/routes/admin-api/feature-type.ts +++ b/src/lib/routes/admin-api/feature-type.ts @@ -75,9 +75,9 @@ export class FeatureTypeController extends Controller { tags: ['Feature Types'], operationId: 'updateFeatureTypeLifetime', summary: 'Update feature type lifetime', - description: `Updates the lifetime configuration for the specified [feature toggle type](https://docs.getunleash.io/reference/feature-toggle-types). The expected lifetime is an integer representing the number of days before Unleash marks a feature toggle of that type as potentially stale. If set to \`null\` or \`0\`, then feature toggles of that particular type will never be marked as potentially stale. + description: `Updates the lifetime configuration for the specified [feature flag type](https://docs.getunleash.io/reference/feature-toggle-types). The expected lifetime is an integer representing the number of days before Unleash marks a feature flag of that type as potentially stale. If set to \`null\` or \`0\`, then feature flags of that particular type will never be marked as potentially stale. -When a feature toggle type's expected lifetime is changed, this will also cause any feature toggles of this type to be reevaluated for potential staleness.`, +When a feature flag type's expected lifetime is changed, this will also cause any feature flags of this type to be reevaluated for potential staleness.`, responses: { 200: createResponseSchema('featureTypeSchema'), ...getStandardResponses(400, 401, 403, 404, 409, 415), diff --git a/src/lib/routes/admin-api/project/variants.ts b/src/lib/routes/admin-api/project/variants.ts index 7915253975..c4b29f2b86 100644 --- a/src/lib/routes/admin-api/project/variants.ts +++ b/src/lib/routes/admin-api/project/variants.ts @@ -109,7 +109,7 @@ export default class VariantsController extends Controller { middleware: [ openApiService.validPath({ summary: - 'Create (overwrite) variants for a feature toggle in all environments', + 'Create (overwrite) variants for a feature flag in all environments', description: `This overwrites the current variants for the feature specified in the :featureName parameter in all environments. The backend will validate the input for the following invariants @@ -174,7 +174,7 @@ The backend will also distribute remaining weight up to 1000 after adding the va openApiService.validPath({ summary: 'Create (overwrite) variants for a feature in an environment', - description: `This overwrites the current variants for the feature toggle in the :featureName parameter for the :environment parameter. + description: `This overwrites the current variants for the feature flag in the :featureName parameter for the :environment parameter. The backend will validate the input for the following invariants: @@ -202,9 +202,9 @@ The backend will also distribute remaining weight up to 1000 after adding the va tags: ['Features'], operationId: 'overwriteFeatureVariantsOnEnvironments', summary: - 'Create (overwrite) variants for a feature toggle in multiple environments', + 'Create (overwrite) variants for a feature flag in multiple environments', description: - 'This overwrites the current variants for the feature toggle in the :featureName parameter for the :environment parameter.', + 'This overwrites the current variants for the feature flag in the :featureName parameter for the :environment parameter.', requestBody: createRequestSchema('pushVariantsSchema'), responses: { 200: createResponseSchema('featureVariantsSchema'), diff --git a/src/lib/services/state-service.test.ts b/src/lib/services/state-service.test.ts index caf2cdc572..a803bf9bb9 100644 --- a/src/lib/services/state-service.test.ts +++ b/src/lib/services/state-service.test.ts @@ -308,7 +308,7 @@ test('should export featureToggles', async () => { expect(data.features[0].name).toBe('a-feature'); }); -test('archived feature toggles should not be included', async () => { +test('archived feature flags should not be included', async () => { const { stateService, stores } = getSetup(); await stores.featureToggleStore.create('default', { @@ -321,7 +321,7 @@ test('archived feature toggles should not be included', async () => { expect(data.features).toHaveLength(0); }); -test('featureStrategy connected to an archived feature toggle should not be included', async () => { +test('featureStrategy connected to an archived feature flag should not be included', async () => { const { stateService, stores } = getSetup(); const featureName = 'fstrat-archived-feature'; await stores.featureToggleStore.create('default', { diff --git a/src/lib/services/state-service.ts b/src/lib/services/state-service.ts index a528a3de8f..c97224dd38 100644 --- a/src/lib/services/state-service.ts +++ b/src/lib/services/state-service.ts @@ -320,9 +320,7 @@ export default class StateService { ? [] : await this.featureStrategiesStore.getAll(); if (dropBeforeImport) { - this.logger.info( - 'Dropping existing strategies for feature toggles', - ); + this.logger.info('Dropping existing strategies for feature flags'); await this.featureStrategiesStore.deleteAll(); } const strategiesToImport = keepExisting @@ -376,13 +374,13 @@ export default class StateService { keepExisting, featureEnvironments, }): Promise { - this.logger.info(`Importing ${features.length} feature toggles`); + this.logger.info(`Importing ${features.length} feature flags`); const oldToggles = dropBeforeImport ? [] : await this.toggleStore.getAll(); if (dropBeforeImport) { - this.logger.info('Dropping existing feature toggles'); + this.logger.info('Dropping existing feature flags'); await this.toggleStore.deleteAll(); await this.eventService.storeEvent({ type: DROP_FEATURES, diff --git a/src/test/e2e/api/admin/feature-archive.e2e.test.ts b/src/test/e2e/api/admin/feature-archive.e2e.test.ts index b0f9d041b1..2828a01575 100644 --- a/src/test/e2e/api/admin/feature-archive.e2e.test.ts +++ b/src/test/e2e/api/admin/feature-archive.e2e.test.ts @@ -52,7 +52,7 @@ beforeAll(async () => { await app.archiveFeature('featureArchivedZ'); await app.createFeature({ name: 'feature.with.variants', - description: 'A feature toggle with variants', + description: 'A feature flag with variants', variants: [ { name: 'control', weight: 50 }, { name: 'new', weight: 50 }, @@ -65,7 +65,7 @@ afterAll(async () => { await db.destroy(); }); -test('returns three archived toggles', async () => { +test('returns three archived flags', async () => { expect.assertions(1); return app.request .get('/api/admin/archive/features') @@ -76,7 +76,7 @@ test('returns three archived toggles', async () => { }); }); -test('returns three archived toggles with archivedAt', async () => { +test('returns three archived flags with archivedAt', async () => { expect.assertions(2); return app.request .get('/api/admin/archive/features') @@ -102,12 +102,12 @@ test('archived feature is not accessible via /features/:featureName', async () = await app.getProjectFeatures('default', 'featureArchivedZ', 404); }); -test('must set name when reviving toggle', async () => { +test('must set name when reviving flag', async () => { expect.assertions(0); return app.request.post('/api/admin/archive/revive/').expect(404); }); -test('should be allowed to reuse deleted toggle name', async () => { +test('should be allowed to reuse deleted flag name', async () => { expect.assertions(2); await app.request .post('/api/admin/projects/default/features') @@ -134,7 +134,7 @@ test('should be allowed to reuse deleted toggle name', async () => { .set('Content-Type', 'application/json') .expect(200); }); -test('Deleting an unarchived toggle should not take effect', async () => { +test('Deleting an unarchived flag should not take effect', async () => { expect.assertions(2); await app.request .post('/api/admin/projects/default/features') diff --git a/src/test/e2e/api/admin/feature.auth.e2e.test.ts b/src/test/e2e/api/admin/feature.auth.e2e.test.ts index 8ca27b5f0e..281425dd5f 100644 --- a/src/test/e2e/api/admin/feature.auth.e2e.test.ts +++ b/src/test/e2e/api/admin/feature.auth.e2e.test.ts @@ -12,7 +12,7 @@ afterAll(async () => { await db.destroy(); }); -test('creates new feature toggle with createdBy', async () => { +test('creates new feature flag with createdBy', async () => { expect.assertions(1); const { request, destroy } = await setupAppWithAuth(db.stores); @@ -22,7 +22,7 @@ test('creates new feature toggle with createdBy', async () => { email: 'user@mail.com', }); - // create toggle + // create flag await request .post('/api/admin/projects/default/features') .send({ diff --git a/src/test/e2e/api/admin/feature.custom-auth.e2e.test.ts b/src/test/e2e/api/admin/feature.custom-auth.e2e.test.ts index b5db3beced..dc9fe286eb 100644 --- a/src/test/e2e/api/admin/feature.custom-auth.e2e.test.ts +++ b/src/test/e2e/api/admin/feature.custom-auth.e2e.test.ts @@ -40,7 +40,7 @@ test('should require authenticated user', async () => { await destroy(); }); -test('creates new feature toggle with createdBy', async () => { +test('creates new feature flag with createdBy', async () => { expect.assertions(1); const email = 'custom-user@mail.com'; @@ -52,7 +52,7 @@ test('creates new feature toggle with createdBy', async () => { }; const { request, destroy } = await setupAppWithCustomAuth(stores, preHook); - // create toggle + // create flag await request .post('/api/admin/projects/default/features') .send({ diff --git a/src/test/e2e/api/admin/maintenance.e2e.test.ts b/src/test/e2e/api/admin/maintenance.e2e.test.ts index 3cb86ea2a5..9e199e45be 100644 --- a/src/test/e2e/api/admin/maintenance.e2e.test.ts +++ b/src/test/e2e/api/admin/maintenance.e2e.test.ts @@ -16,7 +16,7 @@ afterAll(async () => { await db.destroy(); }); -test('should not allow to create feature toggles in maintenance mode', async () => { +test('should not allow to create feature flags in maintenance mode', async () => { const appWithMaintenanceMode = await setupAppWithCustomConfig(db.stores, { experimental: { flags: { diff --git a/src/test/e2e/api/admin/project/variants.e2e.test.ts b/src/test/e2e/api/admin/project/variants.e2e.test.ts index 8e42f66d5d..e37e3fa039 100644 --- a/src/test/e2e/api/admin/project/variants.e2e.test.ts +++ b/src/test/e2e/api/admin/project/variants.e2e.test.ts @@ -312,7 +312,7 @@ test('Can push variants to multiple environments', async () => { }); }); -test("Returns proper error if project and/or feature toggle doesn't exist", async () => { +test("Returns proper error if project and/or feature flag doesn't exist", async () => { await app.request .put( `/api/admin/projects/nonexistent/features/undefined/variants-batch`, diff --git a/src/test/e2e/api/admin/state.e2e.test.ts b/src/test/e2e/api/admin/state.e2e.test.ts index ab1e5dc92e..56e04e754e 100644 --- a/src/test/e2e/api/admin/state.e2e.test.ts +++ b/src/test/e2e/api/admin/state.e2e.test.ts @@ -433,7 +433,7 @@ test(`should not delete api_tokens on import when drop-flag is set`, async () => expect(apiTokens[0].username).toBe(apiTokenName); }); -test(`should not show environment on feature toggle, when environment is disabled`, async () => { +test(`should not show environment on feature flag, when environment is disabled`, async () => { await app.request .post('/api/admin/state/import?drop=true') .attach('file', 'src/test/examples/import-state.json') diff --git a/src/test/e2e/api/client/feature.auth-none.e2e.test.ts b/src/test/e2e/api/client/feature.auth-none.e2e.test.ts index ee26f11573..946a27ddf6 100644 --- a/src/test/e2e/api/client/feature.auth-none.e2e.test.ts +++ b/src/test/e2e/api/client/feature.auth-none.e2e.test.ts @@ -83,7 +83,7 @@ afterAll(async () => { await db.destroy(); }); -test('returns three feature toggles', async () => { +test('returns three feature flags', async () => { return app.request .get('/api/client/features') .expect('Content-Type', /json/) diff --git a/src/test/e2e/api/client/feature.e2e.test.ts b/src/test/e2e/api/client/feature.e2e.test.ts index bb17913d0a..114d93ca7c 100644 --- a/src/test/e2e/api/client/feature.e2e.test.ts +++ b/src/test/e2e/api/client/feature.e2e.test.ts @@ -103,7 +103,7 @@ beforeAll(async () => { 'default', { name: 'feature.with.variants', - description: 'A feature toggle with variants', + description: 'A feature flag with variants', }, TEST_AUDIT_USER, ); @@ -133,7 +133,7 @@ afterAll(async () => { await db.destroy(); }); -test('returns four feature toggles', async () => { +test('returns four feature flags', async () => { return app.request .get('/api/client/features') .expect('Content-Type', /json/) @@ -163,7 +163,7 @@ test('returns dependencies', async () => { }); }); -test('returns four feature toggles without createdAt', async () => { +test('returns four feature flags without createdAt', async () => { return app.request .get('/api/client/features') .expect('Content-Type', /json/) @@ -181,7 +181,7 @@ test('gets a feature by name', async () => { .expect(200); }); -test('returns a feature toggles impression data', async () => { +test('returns a feature flags impression data', async () => { return app.request .get('/api/client/features/featureX') .expect('Content-Type', /json/) @@ -221,7 +221,7 @@ test('Can get strategies for specific environment', async () => { const featureName = 'test.feature.with.env'; const env = DEFAULT_ENV; - // Create feature toggle + // Create feature flag await app.request.post('/api/admin/projects/default/features').send({ name: featureName, type: 'killswitch', @@ -322,7 +322,7 @@ test('Can use multiple filters', async () => { }); }); -test('returns a feature toggles impression data for a different project', async () => { +test('returns a feature flags impression data for a different project', async () => { const project = { id: 'impression-data-client', name: 'ImpressionData', @@ -332,14 +332,14 @@ test('returns a feature toggles impression data for a different project', async await db.stores.projectStore.create(project); - const toggle = { + const flag = { name: 'project-client.impression.data', impressionData: true, }; await app.request .post('/api/admin/projects/impression-data-client/features') - .send(toggle) + .send(flag) .expect(201) .expect((res) => { expect(res.body.impressionData).toBe(true); @@ -349,12 +349,12 @@ test('returns a feature toggles impression data for a different project', async .get('/api/client/features') .expect('Content-Type', /json/) .expect((res) => { - const projectToggle = res.body.features.find( - (resToggle) => resToggle.project === project.id, + const projectFlag = res.body.features.find( + (resFlag) => resFlag.project === project.id, ); - expect(projectToggle.name).toBe(toggle.name); - expect(projectToggle.project).toBe(project.id); - expect(projectToggle.impressionData).toBe(true); + expect(projectFlag.name).toBe(flag.name); + expect(projectFlag.project).toBe(project.id); + expect(projectFlag.impressionData).toBe(true); }); }); diff --git a/src/test/e2e/api/client/feature.env.disabled.e2e.test.ts b/src/test/e2e/api/client/feature.env.disabled.e2e.test.ts index 05e1ae60fa..ef56f920b0 100644 --- a/src/test/e2e/api/client/feature.env.disabled.e2e.test.ts +++ b/src/test/e2e/api/client/feature.env.disabled.e2e.test.ts @@ -41,7 +41,7 @@ afterAll(async () => { await db.destroy(); }); -test('returns feature toggle for default env', async () => { +test('returns feature flag for default env', async () => { await app.services.featureToggleServiceV2.updateEnabled( 'default', 'feature.default.1', @@ -61,7 +61,7 @@ test('returns feature toggle for default env', async () => { }); }); -test('returns feature toggle for default env even if it is removed from project', async () => { +test('returns feature flag for default env even if it is removed from project', async () => { await db.stores.featureEnvironmentStore.disconnectFeatures( 'default', 'default', diff --git a/src/test/e2e/api/client/feature.optimal304.e2e.test.ts b/src/test/e2e/api/client/feature.optimal304.e2e.test.ts index 916bbf4058..db323d0278 100644 --- a/src/test/e2e/api/client/feature.optimal304.e2e.test.ts +++ b/src/test/e2e/api/client/feature.optimal304.e2e.test.ts @@ -93,7 +93,7 @@ beforeAll(async () => { 'default', { name: 'feature.with.variants', - description: 'A feature toggle with variants', + description: 'A feature flag with variants', }, TEST_AUDIT_USER, ); diff --git a/src/test/e2e/api/client/feature.token.access.e2e.test.ts b/src/test/e2e/api/client/feature.token.access.e2e.test.ts index 74e88d0e40..420793c5e7 100644 --- a/src/test/e2e/api/client/feature.token.access.e2e.test.ts +++ b/src/test/e2e/api/client/feature.token.access.e2e.test.ts @@ -121,7 +121,7 @@ afterAll(async () => { await db.destroy(); }); -test('returns feature toggle with "default" config', async () => { +test('returns feature flag with "default" config', async () => { const token = await apiTokenService.createApiToken({ type: ApiTokenType.CLIENT, tokenName, @@ -143,7 +143,7 @@ test('returns feature toggle with "default" config', async () => { }); }); -test('returns feature toggle with testing environment config', async () => { +test('returns feature flag with testing environment config', async () => { const token = await apiTokenService.createApiToken({ type: ApiTokenType.CLIENT, tokenName: tokenName, @@ -169,7 +169,7 @@ test('returns feature toggle with testing environment config', async () => { }); }); -test('returns feature toggle for project2', async () => { +test('returns feature flag for project2', async () => { const token = await apiTokenService.createApiToken({ type: ApiTokenType.CLIENT, tokenName: tokenName, @@ -189,7 +189,7 @@ test('returns feature toggle for project2', async () => { }); }); -test('returns feature toggle for all projects', async () => { +test('returns feature flag for all projects', async () => { const token = await apiTokenService.createApiToken({ type: ApiTokenType.CLIENT, tokenName: tokenName,