mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
parent
4824a02f2b
commit
7937301424
@ -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),
|
||||
};
|
||||
|
@ -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',
|
||||
},
|
||||
},
|
||||
|
@ -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: {
|
||||
|
@ -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'],
|
||||
|
@ -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'],
|
||||
},
|
||||
},
|
||||
|
@ -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',
|
||||
},
|
||||
|
@ -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: {
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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: {
|
||||
|
@ -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: {},
|
||||
|
@ -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,
|
||||
|
@ -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',
|
||||
},
|
||||
{
|
||||
|
@ -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: {
|
||||
|
@ -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,
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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,
|
||||
},
|
||||
|
@ -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,
|
||||
},
|
||||
],
|
||||
|
@ -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',
|
||||
|
@ -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: {
|
||||
|
@ -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: {
|
||||
|
@ -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,
|
||||
},
|
||||
},
|
||||
|
@ -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',
|
||||
|
@ -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: {
|
||||
|
@ -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',
|
||||
|
@ -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: {
|
||||
|
@ -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,
|
||||
},
|
||||
},
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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,
|
||||
|
@ -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.',
|
||||
|
@ -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: {
|
||||
|
@ -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',
|
||||
|
@ -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.',
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -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),
|
||||
|
@ -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'),
|
||||
|
@ -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', {
|
||||
|
@ -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<void> {
|
||||
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,
|
||||
|
@ -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')
|
||||
|
@ -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({
|
||||
|
@ -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({
|
||||
|
@ -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: {
|
||||
|
@ -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`,
|
||||
|
@ -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')
|
||||
|
@ -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/)
|
||||
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
@ -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',
|
||||
|
@ -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,
|
||||
);
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user