mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-17 01:17:29 +02:00
parent
14fd624faa
commit
2fb95339ef
@ -28,15 +28,15 @@ test('should render bulk disable dialog in regular mode', async () => {
|
||||
|
||||
render(<BulkDisableDialog {...defaultProps} />);
|
||||
|
||||
expect(screen.getByText('Disable feature toggles')).toBeInTheDocument();
|
||||
expect(screen.getByText('Disable feature flags')).toBeInTheDocument();
|
||||
expect(screen.getByText('env1')).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByText('1 feature toggle is already disabled.'),
|
||||
screen.getByText('1 feature flag is already disabled.'),
|
||||
).toBeInTheDocument();
|
||||
expect(
|
||||
screen.queryByText('Change requests are enabled for this environment.'),
|
||||
).not.toBeInTheDocument();
|
||||
expect(screen.getByText('Disable toggles')).toBeInTheDocument();
|
||||
expect(screen.getByText('Disable flags')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('should render bulk disable dialog in change request mode', async () => {
|
||||
@ -102,10 +102,10 @@ test('should render bulk disable dialog in change request mode', async () => {
|
||||
);
|
||||
await screen.findByText('3');
|
||||
|
||||
expect(screen.getByText('Disable feature toggles')).toBeInTheDocument();
|
||||
expect(screen.getByText('Disable feature flags')).toBeInTheDocument();
|
||||
expect(screen.getByText('env1')).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByText('2 feature toggles are already disabled.'),
|
||||
screen.getByText('2 feature flags are already disabled.'),
|
||||
).toBeInTheDocument();
|
||||
expect(screen.getByText('Add to change request')).toBeInTheDocument();
|
||||
});
|
||||
|
@ -73,7 +73,7 @@ export const BulkDisableDialog = ({
|
||||
);
|
||||
refetchChangeRequests();
|
||||
setToastData({
|
||||
text: 'Your disabled feature toggles changes have been added to change request',
|
||||
text: 'Your disabled feature flags changes have been added to change request',
|
||||
type: 'success',
|
||||
title: 'Changes added to a draft',
|
||||
});
|
||||
@ -84,7 +84,7 @@ export const BulkDisableDialog = ({
|
||||
selected,
|
||||
);
|
||||
setToastData({
|
||||
text: 'Your feature toggles have been disabled',
|
||||
text: 'Your feature flags have been disabled',
|
||||
type: 'success',
|
||||
title: 'Features disabled',
|
||||
});
|
||||
@ -98,20 +98,19 @@ export const BulkDisableDialog = ({
|
||||
|
||||
const buttonText = isChangeRequestConfigured(selected)
|
||||
? 'Add to change request'
|
||||
: 'Disable toggles';
|
||||
: 'Disable flags';
|
||||
|
||||
return (
|
||||
<Dialogue
|
||||
open={showExportDialog}
|
||||
title='Disable feature toggles'
|
||||
title='Disable feature flags'
|
||||
onClose={onClose}
|
||||
onClick={onClick}
|
||||
primaryButtonText={buttonText}
|
||||
secondaryButtonText='Cancel'
|
||||
>
|
||||
<Box>
|
||||
You have selected <b>{data.length}</b> feature toggles to
|
||||
disable.
|
||||
You have selected <b>{data.length}</b> feature flags to disable.
|
||||
<br />
|
||||
<br />
|
||||
<Typography>
|
||||
@ -136,8 +135,8 @@ export const BulkDisableDialog = ({
|
||||
<SpacedAlert severity='info'>
|
||||
{alreadyDisabledCount} feature{' '}
|
||||
{alreadyDisabledCount > 1
|
||||
? 'toggles are '
|
||||
: 'toggle is '}
|
||||
? 'flags are '
|
||||
: 'flag is '}
|
||||
already disabled.
|
||||
</SpacedAlert>
|
||||
}
|
||||
|
@ -28,15 +28,15 @@ test('should render bulk enable dialog in regular mode', async () => {
|
||||
|
||||
render(<BulkEnableDialog {...defaultProps} />);
|
||||
|
||||
expect(screen.getByText('Enable feature toggles')).toBeInTheDocument();
|
||||
expect(screen.getByText('Enable feature flags')).toBeInTheDocument();
|
||||
expect(screen.getByText('env1')).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByText('1 feature toggle is already enabled.'),
|
||||
screen.getByText('1 feature flag is already enabled.'),
|
||||
).toBeInTheDocument();
|
||||
expect(
|
||||
screen.queryByText('Change requests are enabled for this environment.'),
|
||||
).not.toBeInTheDocument();
|
||||
expect(screen.getByText('Enable toggles')).toBeInTheDocument();
|
||||
expect(screen.getByText('Enable flags')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('should render bulk enable dialog in change request mode', async () => {
|
||||
@ -102,10 +102,10 @@ test('should render bulk enable dialog in change request mode', async () => {
|
||||
);
|
||||
await screen.findByText('3');
|
||||
|
||||
expect(screen.getByText('Enable feature toggles')).toBeInTheDocument();
|
||||
expect(screen.getByText('Enable feature flags')).toBeInTheDocument();
|
||||
expect(screen.getByText('env1')).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByText('2 feature toggles are already enabled.'),
|
||||
screen.getByText('2 feature flags are already enabled.'),
|
||||
).toBeInTheDocument();
|
||||
expect(screen.getByText('Add to change request')).toBeInTheDocument();
|
||||
});
|
||||
|
@ -73,7 +73,7 @@ export const BulkEnableDialog = ({
|
||||
);
|
||||
refetchChangeRequests();
|
||||
setToastData({
|
||||
text: 'Your enable feature toggles changes have been added to change request',
|
||||
text: 'Your enable feature flags changes have been added to change request',
|
||||
type: 'success',
|
||||
title: 'Changes added to a draft',
|
||||
});
|
||||
@ -84,7 +84,7 @@ export const BulkEnableDialog = ({
|
||||
selected,
|
||||
);
|
||||
setToastData({
|
||||
text: 'Your feature toggles have been enabled',
|
||||
text: 'Your feature flags have been enabled',
|
||||
type: 'success',
|
||||
title: 'Features enabled',
|
||||
});
|
||||
@ -99,20 +99,19 @@ export const BulkEnableDialog = ({
|
||||
|
||||
const buttonText = isChangeRequestConfigured(selected)
|
||||
? 'Add to change request'
|
||||
: 'Enable toggles';
|
||||
: 'Enable flags';
|
||||
|
||||
return (
|
||||
<Dialogue
|
||||
open={showExportDialog}
|
||||
title='Enable feature toggles'
|
||||
title='Enable feature flags'
|
||||
onClose={onClose}
|
||||
onClick={onClick}
|
||||
primaryButtonText={buttonText}
|
||||
secondaryButtonText='Cancel'
|
||||
>
|
||||
<Box>
|
||||
You have selected <b>{data.length}</b> feature toggles to
|
||||
enable.
|
||||
You have selected <b>{data.length}</b> feature flags to enable.
|
||||
<br />
|
||||
<br />
|
||||
<Typography>
|
||||
@ -137,8 +136,8 @@ export const BulkEnableDialog = ({
|
||||
<SpacedAlert severity='info'>
|
||||
{alreadyEnabledCount} feature{' '}
|
||||
{alreadyEnabledCount > 1
|
||||
? 'toggles are '
|
||||
: 'toggle is '}
|
||||
? 'flags are '
|
||||
: 'flag is '}
|
||||
already enabled.
|
||||
</SpacedAlert>
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ export const ExportDialog = ({
|
||||
return (
|
||||
<Dialogue
|
||||
open={showExportDialog}
|
||||
title='Export feature toggle configuration'
|
||||
title='Export feature flag configuration'
|
||||
onClose={onClose}
|
||||
onClick={onClick}
|
||||
primaryButtonText='Export selection'
|
||||
@ -93,14 +93,13 @@ export const ExportDialog = ({
|
||||
show={
|
||||
<span>
|
||||
The current search filter will be used to export
|
||||
feature toggles. Currently {data.length} feature
|
||||
toggles will be exported.
|
||||
feature flags. Currently {data.length} feature flags
|
||||
will be exported.
|
||||
</span>
|
||||
}
|
||||
elseShow={
|
||||
<span>
|
||||
You will export all feature toggles from this
|
||||
project.
|
||||
You will export all feature flags from this project.
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
@ -108,7 +107,7 @@ export const ExportDialog = ({
|
||||
<br />
|
||||
<br />
|
||||
<Typography>
|
||||
Select which environment to export feature toggle
|
||||
Select which environment to export feature flag
|
||||
configuration from:
|
||||
</Typography>
|
||||
<StyledSelect
|
||||
|
@ -18,6 +18,6 @@ test('all options are drawn', async () => {
|
||||
|
||||
await userEvent.click(batchReviveButton!);
|
||||
|
||||
await screen.findByText('New feature toggle');
|
||||
await screen.findByText('New feature flag');
|
||||
await screen.findByText('Export');
|
||||
});
|
||||
|
@ -31,13 +31,13 @@ const StyledPopover = styled(Popover)(({ theme }) => ({
|
||||
padding: theme.spacing(1, 1.5),
|
||||
}));
|
||||
|
||||
interface IFeatureToggleListActions {
|
||||
interface IFeatureFlagListActions {
|
||||
onExportClick: () => void;
|
||||
}
|
||||
|
||||
export const FeatureToggleListActions: FC<IFeatureToggleListActions> = ({
|
||||
export const FeatureToggleListActions: FC<IFeatureFlagListActions> = ({
|
||||
onExportClick,
|
||||
}: IFeatureToggleListActions) => {
|
||||
}: IFeatureFlagListActions) => {
|
||||
const { trackEvent } = usePlausibleTracker();
|
||||
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
||||
const featuresExportImport = useUiFlag('featuresExportImport');
|
||||
@ -59,7 +59,7 @@ export const FeatureToggleListActions: FC<IFeatureToggleListActions> = ({
|
||||
setAnchorEl(null);
|
||||
};
|
||||
|
||||
const id = `feature-toggle-list-actions`;
|
||||
const id = `feature-flag-list-actions`;
|
||||
const menuId = `${id}-menu`;
|
||||
|
||||
return (
|
||||
@ -117,7 +117,7 @@ export const FeatureToggleListActions: FC<IFeatureToggleListActions> = ({
|
||||
</ListItemIcon>
|
||||
<ListItemText>
|
||||
<Typography variant='body2'>
|
||||
New feature toggle
|
||||
New feature flag
|
||||
</Typography>
|
||||
</ListItemText>
|
||||
</MenuItem>
|
||||
|
@ -137,7 +137,7 @@ test('Filter table by project', async () => {
|
||||
await filterFeaturesByProject('Project B');
|
||||
|
||||
await screen.findByText(
|
||||
'No feature toggles found matching your criteria. Get started by adding a new feature toggle.',
|
||||
'No feature flags found matching your criteria. Get started by adding a new feature flag.',
|
||||
);
|
||||
expect(window.location.href).toContain(
|
||||
'?offset=0&columns=&project=IS%3Aproject-b',
|
||||
|
@ -339,7 +339,7 @@ export const FeatureToggleListTable: VFC = () => {
|
||||
expandable
|
||||
initialValue={query || ''}
|
||||
onChange={setSearchValue}
|
||||
id='globalFeatureToggles'
|
||||
id='globalFeatureFlags'
|
||||
/>
|
||||
<PageHeader.Divider />
|
||||
</>
|
||||
@ -430,7 +430,7 @@ export const FeatureToggleListTable: VFC = () => {
|
||||
<Search
|
||||
initialValue={query || ''}
|
||||
onChange={setSearchValue}
|
||||
id='globalFeatureToggles'
|
||||
id='globalFeatureFlags'
|
||||
/>
|
||||
}
|
||||
/>
|
||||
@ -454,16 +454,16 @@ export const FeatureToggleListTable: VFC = () => {
|
||||
condition={(query || '')?.length > 0}
|
||||
show={
|
||||
<TablePlaceholder>
|
||||
No feature toggles found matching “
|
||||
No feature flags found matching “
|
||||
{query}
|
||||
”
|
||||
</TablePlaceholder>
|
||||
}
|
||||
elseShow={
|
||||
<TablePlaceholder>
|
||||
No feature toggles found matching your
|
||||
No feature flags found matching your
|
||||
criteria. Get started by adding a new
|
||||
feature toggle.
|
||||
feature flag.
|
||||
</TablePlaceholder>
|
||||
}
|
||||
/>
|
||||
|
@ -229,7 +229,7 @@ export const ManageBulkTagsDialog: VFC<IManageBulkTagsDialogProps> = ({
|
||||
open={open}
|
||||
secondaryButtonText='Cancel'
|
||||
primaryButtonText='Save tags'
|
||||
title='Update feature toggle tags'
|
||||
title='Update feature flag tags'
|
||||
onClick={() => onSubmit(payload)}
|
||||
disabledPrimaryButton={
|
||||
payload.addedTags.length === 0 &&
|
||||
|
@ -179,9 +179,7 @@ export const ManageTagsDialog = ({ open, setOpen }: IManageTagsProps) => {
|
||||
differenceCount > 0 &&
|
||||
setToastData({
|
||||
type: 'success',
|
||||
title: `Updated tag${
|
||||
added.length > 1 ? 's' : ''
|
||||
} to toggle`,
|
||||
title: `Updated tag${added.length > 1 ? 's' : ''} to flag`,
|
||||
text: getToastText(added.length, removed.length),
|
||||
confetti: true,
|
||||
});
|
||||
@ -253,7 +251,7 @@ export const ManageTagsDialog = ({ open, setOpen }: IManageTagsProps) => {
|
||||
open={open}
|
||||
secondaryButtonText='Cancel'
|
||||
primaryButtonText='Save tags'
|
||||
title='Update feature toggle tags'
|
||||
title='Update feature flag tags'
|
||||
onClick={onSubmit}
|
||||
disabledPrimaryButton={loading || differenceCount === 0}
|
||||
onClose={onCancel}
|
||||
|
@ -329,9 +329,9 @@ export const EnvironmentVariantsModal = ({
|
||||
<FormTemplate
|
||||
modal
|
||||
title=''
|
||||
description='Variants allow you to return a variant object if the feature toggle is considered enabled for the current request.'
|
||||
description='Variants allow you to return a variant object if the feature flag is considered enabled for the current request.'
|
||||
documentationLink='https://docs.getunleash.io/reference/feature-toggle-variants'
|
||||
documentationLinkLabel='Feature toggle variants documentation'
|
||||
documentationLinkLabel='Feature flag variants documentation'
|
||||
formatApiCode={formatApiCode}
|
||||
loading={!open}
|
||||
>
|
||||
|
@ -27,7 +27,7 @@ exports[`should render DrawerMenu 1`] = `
|
||||
</h2>
|
||||
<br />
|
||||
<small>
|
||||
The enterprise ready feature toggle service.
|
||||
The enterprise ready feature flag service.
|
||||
</small>
|
||||
<br />
|
||||
</section>
|
||||
@ -571,7 +571,7 @@ exports[`should render DrawerMenu with "features" selected 1`] = `
|
||||
</h2>
|
||||
<br />
|
||||
<small>
|
||||
The enterprise ready feature toggle service.
|
||||
The enterprise ready feature flag service.
|
||||
</small>
|
||||
<br />
|
||||
</section>
|
||||
|
@ -57,7 +57,7 @@ const CreateProject = () => {
|
||||
}
|
||||
|
||||
const generalDocumentation =
|
||||
'Projects allows you to group feature toggles together in the management UI.';
|
||||
'Projects allows you to group feature flags together in the management UI.';
|
||||
|
||||
const [documentation, setDocumentation] = useState(generalDocumentation);
|
||||
|
||||
@ -82,7 +82,7 @@ const CreateProject = () => {
|
||||
navigate(`/projects/${createdProject.id}`, { replace: true });
|
||||
setToastData({
|
||||
title: 'Project created',
|
||||
text: 'Now you can add toggles to this project',
|
||||
text: 'Now you can add flags to this project',
|
||||
confetti: true,
|
||||
type: 'success',
|
||||
});
|
||||
@ -118,7 +118,7 @@ const CreateProject = () => {
|
||||
<FormTemplate
|
||||
loading={loading}
|
||||
title='Create project'
|
||||
description='Projects allows you to group feature toggles together in the management UI.'
|
||||
description='Projects allows you to group feature flags together in the management UI.'
|
||||
documentationLink='https://docs.getunleash.io/reference/projects'
|
||||
documentationLinkLabel='Projects documentation'
|
||||
formatApiCode={formatApiCode}
|
||||
|
@ -68,7 +68,7 @@ export const CreateProjectDialogue = ({
|
||||
} = useProjectForm();
|
||||
|
||||
const generalDocumentation =
|
||||
'Projects allows you to group feature toggles together in the management UI.';
|
||||
'Projects allows you to group feature flags together in the management UI.';
|
||||
|
||||
const [documentation, setDocumentation] = useState(generalDocumentation);
|
||||
|
||||
@ -99,7 +99,7 @@ export const CreateProjectDialogue = ({
|
||||
navigate(`/projects/${createdProject.id}`, { replace: true });
|
||||
setToastData({
|
||||
title: 'Project created',
|
||||
text: 'Now you can add toggles to this project',
|
||||
text: 'Now you can add flags to this project',
|
||||
confetti: true,
|
||||
type: 'success',
|
||||
});
|
||||
|
@ -217,7 +217,7 @@ export const NewProjectForm: React.FC<FormProps> = ({
|
||||
}}
|
||||
onOpen={() =>
|
||||
overrideDocumentation(
|
||||
`Each feature toggle can have a separate configuration per environment. This setting configures which environments your project should start with.`,
|
||||
`Each feature flag can have a separate configuration per environment. This setting configures which environments your project should start with.`,
|
||||
)
|
||||
}
|
||||
onClose={clearDocumentationOverride}
|
||||
|
@ -35,7 +35,7 @@ test('selects project features', async () => {
|
||||
);
|
||||
await screen.findByText('featureA');
|
||||
await screen.findByText('featureB');
|
||||
await screen.findByText('Feature toggles (2)');
|
||||
await screen.findByText('Feature flags (2)');
|
||||
|
||||
const [selectAll, selectFeatureA, selectFeatureB] =
|
||||
screen.queryAllByRole('checkbox');
|
||||
|
@ -95,7 +95,7 @@ export const ProjectFeatureTogglesHeader: VFC<
|
||||
<PageHeader
|
||||
titleElement={
|
||||
showTitle
|
||||
? `Feature toggles ${
|
||||
? `Feature flags ${
|
||||
totalItems !== undefined ? `(${totalItems})` : ''
|
||||
}`
|
||||
: null
|
||||
@ -114,7 +114,7 @@ export const ProjectFeatureTogglesHeader: VFC<
|
||||
onFocus={() => setShowTitle(false)}
|
||||
onBlur={() => setShowTitle(true)}
|
||||
hasFilters
|
||||
id='projectFeatureToggles'
|
||||
id='projectFeatureFlags'
|
||||
/>
|
||||
}
|
||||
/>
|
||||
@ -125,7 +125,7 @@ export const ProjectFeatureTogglesHeader: VFC<
|
||||
show={
|
||||
<>
|
||||
<Tooltip
|
||||
title='Export all project toggles'
|
||||
title='Export all project flags'
|
||||
arrow
|
||||
>
|
||||
<IconButton
|
||||
@ -188,7 +188,7 @@ export const ProjectFeatureTogglesHeader: VFC<
|
||||
permission={CREATE_FEATURE}
|
||||
data-testid='NAVIGATE_TO_CREATE_FEATURE'
|
||||
>
|
||||
New feature toggle
|
||||
New feature flag
|
||||
</StyledResponsiveButton>
|
||||
</>
|
||||
}
|
||||
@ -200,7 +200,7 @@ export const ProjectFeatureTogglesHeader: VFC<
|
||||
initialValue={searchQuery || ''}
|
||||
onChange={handleSearch}
|
||||
hasFilters
|
||||
id='projectFeatureToggles'
|
||||
id='projectFeatureFlags'
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
@ -89,7 +89,7 @@ export const ProjectDoraMetrics = () => {
|
||||
align: 'center',
|
||||
Cell: ({ row: { original } }: any) => (
|
||||
<Tooltip
|
||||
title='The time from the feature toggle of type release was created until it was turned on in a production environment'
|
||||
title='The time from the feature flag of type release was created until it was turned on in a production environment'
|
||||
arrow
|
||||
>
|
||||
<Box
|
||||
@ -204,7 +204,7 @@ export const ProjectDoraMetrics = () => {
|
||||
isLoading={loading}
|
||||
header={
|
||||
<PageHeader
|
||||
title={`Lead time for changes (per release toggle)`}
|
||||
title={`Lead time for changes (per release flag)`}
|
||||
/>
|
||||
}
|
||||
>
|
||||
|
@ -88,7 +88,7 @@ export const ActionsCell: VFC<IActionsCellProps> = ({
|
||||
|
||||
return (
|
||||
<StyledBoxCell>
|
||||
<Tooltip title='Feature toggle actions' arrow describeChild>
|
||||
<Tooltip title='Feature flag actions' arrow describeChild>
|
||||
<IconButton
|
||||
id={id}
|
||||
data-loading
|
||||
|
@ -76,7 +76,7 @@ export const ManageTags: VFC<IManageTagsProps> = ({
|
||||
|
||||
setToastData({
|
||||
title: 'Tags updated',
|
||||
text: `${features.length} feature toggles updated. ${added} ${removed}`,
|
||||
text: `${features.length} feature flags updated. ${added} ${removed}`,
|
||||
type: 'success',
|
||||
autoHideDuration: 12000,
|
||||
});
|
||||
|
@ -187,8 +187,8 @@ export const ReportTable = ({ projectId, features }: IReportTableProps) => {
|
||||
|
||||
const title =
|
||||
rows.length < data.length
|
||||
? `Feature toggles (${rows.length} of ${data.length})`
|
||||
: `Feature toggles (${data.length})`;
|
||||
? `Feature flags (${rows.length} of ${data.length})`
|
||||
: `Feature flags (${data.length})`;
|
||||
|
||||
return (
|
||||
<PageContent
|
||||
@ -218,14 +218,14 @@ export const ReportTable = ({ projectId, features }: IReportTableProps) => {
|
||||
condition={globalFilter?.length > 0}
|
||||
show={
|
||||
<TablePlaceholder>
|
||||
No feature toggles found matching “
|
||||
No feature flags found matching “
|
||||
{globalFilter}
|
||||
”
|
||||
</TablePlaceholder>
|
||||
}
|
||||
elseShow={
|
||||
<TablePlaceholder>
|
||||
No feature toggles available. Get started by
|
||||
No feature flags available. Get started by
|
||||
adding a new feature toggle.
|
||||
</TablePlaceholder>
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ export const CreateProjectApiTokenForm = () => {
|
||||
loading={loading}
|
||||
title={pageTitle}
|
||||
modal
|
||||
description="Unleash SDKs use API tokens to authenticate to the Unleash API. Client SDKs need a token with 'client privileges', which allows them to fetch feature toggle configurations and post usage metrics."
|
||||
description="Unleash SDKs use API tokens to authenticate to the Unleash API. Client SDKs need a token with 'client privileges', which allows them to fetch feature flag configurations and post usage metrics."
|
||||
documentationLink='https://docs.getunleash.io/reference/api-tokens-and-client-keys'
|
||||
documentationLinkLabel='API tokens documentation'
|
||||
formatApiCode={formatApiCode}
|
||||
|
@ -207,7 +207,7 @@ export const formatUpdateStrategyApiCode = (
|
||||
|
||||
export const projectDefaultStrategyHelp = `
|
||||
An activation strategy will only run when a feature flag is enabled and provides a way to control who will get access to the feature.
|
||||
If any of a feature toggle's activation strategies returns true, the user will get access.
|
||||
If any of a feature flag's activation strategies returns true, the user will get access.
|
||||
`;
|
||||
|
||||
export const projectDefaultStrategyDocsLink =
|
||||
|
@ -114,7 +114,7 @@ export const UpdateProject = ({ project }: IUpdateProject) => {
|
||||
<FormTemplate
|
||||
loading={loading}
|
||||
title='General settings'
|
||||
description='Projects allows you to group feature toggles together in the management UI.'
|
||||
description='Projects allows you to group feature flags together in the management UI.'
|
||||
documentationLink='https://docs.getunleash.io/reference/projects'
|
||||
documentationLinkLabel='Projects documentation'
|
||||
formatApiCode={formatProjectApiCode}
|
||||
|
@ -36,9 +36,9 @@ export const EnvironmentHideDialog = ({
|
||||
|
||||
return (
|
||||
<Dialogue
|
||||
title='Hide environment and disable feature toggles?'
|
||||
title='Hide environment and disable feature flags?'
|
||||
open={open}
|
||||
primaryButtonText='Hide environment and disable feature toggles'
|
||||
primaryButtonText='Hide environment and disable feature flags'
|
||||
disabledPrimaryButton={environment?.name !== confirmName}
|
||||
secondaryButtonText='Close'
|
||||
onClick={onConfirm}
|
||||
@ -48,7 +48,7 @@ export const EnvironmentHideDialog = ({
|
||||
>
|
||||
<Alert severity='error'>
|
||||
<strong>Danger!</strong> Hiding an environment will disable all
|
||||
the feature toggles that are enabled in this environment and it
|
||||
the feature flags that are enabled in this environment and it
|
||||
can impact client applications connected to the environment.
|
||||
</Alert>
|
||||
|
||||
|
@ -186,7 +186,7 @@ const ProjectEnvironmentList = () => {
|
||||
<PermissionSwitch
|
||||
tooltip={
|
||||
original.projectVisible
|
||||
? 'Hide environment and disable feature toggles'
|
||||
? 'Hide environment and disable feature flags'
|
||||
: 'Make it visible'
|
||||
}
|
||||
size='medium'
|
||||
|
@ -129,5 +129,5 @@ export const CreateSegment = ({ modal }: ICreateSegmentProps) => {
|
||||
export const segmentsFormDescription = `
|
||||
Segments make it easy for you to define which of your users should get access to a feature.
|
||||
A segment is a reusable collection of constraints.
|
||||
You can create and apply a segment when configuring activation strategies for a feature toggle or at any time from the segments page in the navigation menu.
|
||||
You can create and apply a segment when configuring activation strategies for a feature flag or at any time from the segments page in the navigation menu.
|
||||
`;
|
||||
|
@ -54,7 +54,7 @@ export const featureFetcher = async (
|
||||
}
|
||||
|
||||
if (!res.ok) {
|
||||
await handleErrorResponses('Feature toggle data')(res);
|
||||
await handleErrorResponses('Feature flag data')(res);
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -5,7 +5,7 @@ import handleErrorResponses from '../httpErrorResponseHandler';
|
||||
|
||||
const fetcher = (path: string) => {
|
||||
return fetch(path)
|
||||
.then(handleErrorResponses('Feature toggle'))
|
||||
.then(handleErrorResponses('Feature flag'))
|
||||
.then((res) => res.json());
|
||||
};
|
||||
|
||||
|
@ -12,7 +12,7 @@ export interface IUseFeaturesArchiveOutput {
|
||||
|
||||
const fetcher = (path: string) => {
|
||||
return fetch(path)
|
||||
.then(handleErrorResponses('Feature toggle archive'))
|
||||
.then(handleErrorResponses('Feature flag archive'))
|
||||
.then((res) => res.json());
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,7 @@ import type { IUiConfig } from 'interfaces/uiConfig';
|
||||
export const defaultValue: IUiConfig = {
|
||||
name: 'Unleash',
|
||||
version: '5.x',
|
||||
slogan: 'The enterprise ready feature toggle service.',
|
||||
slogan: 'The enterprise ready feature flag service.',
|
||||
flags: {
|
||||
P: false,
|
||||
RE: false,
|
||||
|
@ -16,7 +16,7 @@ exports[`Should format specialised text for events when a scheduled change reque
|
||||
|
||||
exports[`Should format specialised text for events when change request is scheduled 1`] = `
|
||||
{
|
||||
"text": "*user@company.com* scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature toggle *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* to be applied at in project *my-other-project*",
|
||||
"text": "*user@company.com* scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature flag *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* to be applied at in project *my-other-project*",
|
||||
"url": "unleashUrl/projects/my-other-project/change-requests/1",
|
||||
}
|
||||
`;
|
||||
@ -170,14 +170,14 @@ exports[`Should format specialised text for events when rollout percentage chang
|
||||
|
||||
exports[`Should format specialised text for events when scheduled change request fails 1`] = `
|
||||
{
|
||||
"text": "*Failed* to apply the scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature toggle *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* by *user@company.com* in project *my-other-project*.",
|
||||
"text": "*Failed* to apply the scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature flag *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* by *user@company.com* in project *my-other-project*.",
|
||||
"url": "unleashUrl/projects/my-other-project/change-requests/1",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`Should format specialised text for events when scheduled change request succeeds 1`] = `
|
||||
{
|
||||
"text": "*Successfully* applied the scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature toggle *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* by *user@company.com* in project *my-other-project*.",
|
||||
"text": "*Successfully* applied the scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature flag *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* by *user@company.com* in project *my-other-project*.",
|
||||
"url": "unleashUrl/projects/my-other-project/change-requests/1",
|
||||
}
|
||||
`;
|
||||
|
@ -22,7 +22,7 @@ const dataDogDefinition: IAddonDefinition = {
|
||||
displayName: 'Datadog',
|
||||
description: 'Allows Unleash to post updates to Datadog.',
|
||||
documentationUrl: 'https://docs.getunleash.io/docs/addons/datadog',
|
||||
howTo: 'The Datadog integration allows Unleash to post Updates to Datadog when a feature toggle is updated.',
|
||||
howTo: 'The Datadog integration allows Unleash to post Updates to Datadog when a feature flag is updated.',
|
||||
parameters: [
|
||||
{
|
||||
name: 'url',
|
||||
|
@ -334,7 +334,7 @@ export class FeatureEventFormatterMd implements FeatureEventFormatter {
|
||||
const text = `#${changeRequestId}`;
|
||||
const featureLink = this.generateFeatureLink(event);
|
||||
const featureText = featureLink
|
||||
? ` for feature toggle *${featureLink}*`
|
||||
? ` for feature flag *${featureLink}*`
|
||||
: '';
|
||||
const environmentText = environment
|
||||
? ` in the *${environment}* environment`
|
||||
|
@ -64,7 +64,7 @@ const slackAppDefinition: IAddonDefinition = {
|
||||
displayName: 'Slack App',
|
||||
description:
|
||||
'The Unleash Slack App posts messages to the selected channels in your Slack workspace.',
|
||||
howTo: 'Below you can specify which Slack channels receive event notifications. The configuration settings allow you to choose the events and whether you want to filter them by projects and environments.\n\nYou can also select which channels to post to by configuring your feature toggles with “slack” tags. For example, if you’d like the bot to post messages to the #general channel, you can configure your feature toggle with the “slack:general” tag.\n\nThe Unleash Slack App bot has access to public channels by default. If you want the bot to post messages to private channels, you’ll need to invite it to those channels.',
|
||||
howTo: 'Below you can specify which Slack channels receive event notifications. The configuration settings allow you to choose the events and whether you want to filter them by projects and environments.\n\nYou can also select which channels to post to by configuring your feature flags with “slack” tags. For example, if you’d like the bot to post messages to the #general channel, you can configure your feature flag with the “slack:general” tag.\n\nThe Unleash Slack App bot has access to public channels by default. If you want the bot to post messages to private channels, you’ll need to invite it to those channels.',
|
||||
documentationUrl: 'https://docs.getunleash.io/docs/addons/slack-app',
|
||||
installation: {
|
||||
url: 'https://unleash-slack-app.vercel.app/install',
|
||||
|
@ -22,7 +22,7 @@ const teamsDefinition: IAddonDefinition = {
|
||||
displayName: 'Microsoft Teams',
|
||||
description: 'Allows Unleash to post updates to Microsoft Teams.',
|
||||
documentationUrl: 'https://docs.getunleash.io/docs/addons/teams',
|
||||
howTo: 'The Microsoft Teams integration allows Unleash to post Updates when a feature toggle is updated.',
|
||||
howTo: 'The Microsoft Teams integration allows Unleash to post Updates when a feature flag is updated.',
|
||||
parameters: [
|
||||
{
|
||||
name: 'url',
|
||||
|
@ -35,7 +35,7 @@ describe('calculateProjectHealth', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('counts active toggles', () => {
|
||||
it('counts active flags', () => {
|
||||
const features = [{ stale: false }, {}];
|
||||
|
||||
expect(calculateProjectHealth(features, exampleFeatureTypes)).toEqual({
|
||||
@ -45,7 +45,7 @@ describe('calculateProjectHealth', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('counts stale toggles', () => {
|
||||
it('counts stale flags', () => {
|
||||
const features = [{ stale: true }, { stale: false }, {}];
|
||||
|
||||
expect(calculateProjectHealth(features, exampleFeatureTypes)).toEqual({
|
||||
@ -55,7 +55,7 @@ describe('calculateProjectHealth', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('takes feature type into account when calculating potentially stale toggles', () => {
|
||||
it('takes feature type into account when calculating potentially stale flags', () => {
|
||||
expect(
|
||||
calculateProjectHealth(
|
||||
[
|
||||
@ -108,7 +108,7 @@ describe('calculateProjectHealth', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("doesn't count stale toggles as potentially stale or stale as active", () => {
|
||||
it("doesn't count stale flags as potentially stale or stale as active", () => {
|
||||
const features = [
|
||||
{
|
||||
stale: true,
|
||||
@ -150,11 +150,11 @@ describe('calculateProjectHealth', () => {
|
||||
});
|
||||
|
||||
describe('calculateHealthRating', () => {
|
||||
it('works with empty feature toggles', () => {
|
||||
it('works with empty feature flags', () => {
|
||||
expect(calculateHealthRating([], exampleFeatureTypes)).toEqual(100);
|
||||
});
|
||||
|
||||
it('works with stale and active feature toggles', () => {
|
||||
it('works with stale and active feature flags', () => {
|
||||
expect(
|
||||
calculateHealthRating(
|
||||
[{ stale: true }, { stale: true }],
|
||||
@ -175,7 +175,7 @@ describe('calculateHealthRating', () => {
|
||||
).toEqual(67);
|
||||
});
|
||||
|
||||
it('counts potentially stale toggles', () => {
|
||||
it('counts potentially stale flags', () => {
|
||||
expect(
|
||||
calculateHealthRating(
|
||||
[
|
||||
|
@ -102,9 +102,9 @@ export default class FeatureController extends Controller {
|
||||
middleware: [
|
||||
openApiService.validPath({
|
||||
operationId: 'getClientFeature',
|
||||
summary: 'Get a single feature toggle',
|
||||
summary: 'Get a single feature flag',
|
||||
description:
|
||||
'Gets all the client data for a single toggle. Contains the exact same information about a toggle as the `/api/client/features` endpoint does, but only contains data about the specified toggle. All SDKs should use `/api/client/features`',
|
||||
'Gets all the client data for a single flag. Contains the exact same information about a flag as the `/api/client/features` endpoint does, but only contains data about the specified flag. All SDKs should use `/api/client/features`',
|
||||
tags: ['Client'],
|
||||
responses: {
|
||||
200: createResponseSchema('clientFeatureSchema'),
|
||||
@ -120,9 +120,9 @@ export default class FeatureController extends Controller {
|
||||
permission: NONE,
|
||||
middleware: [
|
||||
openApiService.validPath({
|
||||
summary: 'Get all toggles (SDK)',
|
||||
summary: 'Get all flags (SDK)',
|
||||
description:
|
||||
'Returns the SDK configuration for all feature toggles that are available to the provided API key. Used by SDKs to configure local evaluation',
|
||||
'Returns the SDK configuration for all feature flags that are available to the provided API key. Used by SDKs to configure local evaluation',
|
||||
operationId: 'getAllClientFeatures',
|
||||
tags: ['Client'],
|
||||
responses: {
|
||||
@ -302,7 +302,7 @@ export default class FeatureController extends Controller {
|
||||
|
||||
const toggle = toggles.find((t) => t.name === name);
|
||||
if (!toggle) {
|
||||
throw new NotFoundError(`Could not find feature toggle ${name}`);
|
||||
throw new NotFoundError(`Could not find feature flag ${name}`);
|
||||
}
|
||||
this.openApiService.respondWithValidation(
|
||||
200,
|
||||
|
@ -66,7 +66,7 @@ class ExportImportController extends Controller {
|
||||
},
|
||||
description:
|
||||
"Exports all features listed in the `features` property from the environment specified in the request body. If set to `true`, the `downloadFile` property will let you download a file with the exported data. Otherwise, the export data is returned directly as JSON. Refer to the documentation for more information about [Unleash's export functionality](https://docs.getunleash.io/reference/deploy/environment-import-export#export).",
|
||||
summary: 'Export feature toggles from an environment',
|
||||
summary: 'Export feature flags from an environment',
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -205,12 +205,12 @@ test('should collect metrics for function timings', async () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('should collect metrics for feature toggle size', async () => {
|
||||
test('should collect metrics for feature flag size', async () => {
|
||||
const metrics = await prometheusRegister.metrics();
|
||||
expect(metrics).toMatch(/feature_toggles_total\{version="(.*)"\} 0/);
|
||||
});
|
||||
|
||||
test('should collect metrics for archived feature toggle size', async () => {
|
||||
test('should collect metrics for archived feature flag size', async () => {
|
||||
const metrics = await prometheusRegister.metrics();
|
||||
expect(metrics).toMatch(/feature_toggles_archived_total 0/);
|
||||
});
|
||||
|
@ -94,25 +94,25 @@ export default class MetricsMonitor {
|
||||
maxAgeSeconds: 600,
|
||||
ageBuckets: 5,
|
||||
});
|
||||
const featureToggleUpdateTotal = createCounter({
|
||||
const featureFlagUpdateTotal = createCounter({
|
||||
name: 'feature_toggle_update_total',
|
||||
help: 'Number of times a toggle has been updated. Environment label would be "n/a" when it is not available, e.g. when a feature toggle is created.',
|
||||
help: 'Number of times a toggle has been updated. Environment label would be "n/a" when it is not available, e.g. when a feature flag is created.',
|
||||
labelNames: ['toggle', 'project', 'environment', 'environmentType'],
|
||||
});
|
||||
const featureToggleUsageTotal = createCounter({
|
||||
const featureFlagUsageTotal = createCounter({
|
||||
name: 'feature_toggle_usage_total',
|
||||
help: 'Number of times a feature toggle has been used',
|
||||
help: 'Number of times a feature flag has been used',
|
||||
labelNames: ['toggle', 'active', 'appName'],
|
||||
});
|
||||
const featureTogglesTotal = createGauge({
|
||||
const featureFlagsTotal = createGauge({
|
||||
name: 'feature_toggles_total',
|
||||
help: 'Number of feature toggles',
|
||||
help: 'Number of feature flags',
|
||||
labelNames: ['version'],
|
||||
});
|
||||
|
||||
const featureTogglesArchivedTotal = createGauge({
|
||||
name: 'feature_toggles_archived_total',
|
||||
help: 'Number of archived feature toggles',
|
||||
help: 'Number of archived feature flags',
|
||||
});
|
||||
const usersTotal = createGauge({
|
||||
name: 'users_total',
|
||||
@ -275,10 +275,8 @@ export default class MetricsMonitor {
|
||||
try {
|
||||
const stats = await instanceStatsService.getStats();
|
||||
|
||||
featureTogglesTotal.reset();
|
||||
featureTogglesTotal
|
||||
.labels({ version })
|
||||
.set(stats.featureToggles);
|
||||
featureFlagsTotal.reset();
|
||||
featureFlagsTotal.labels({ version }).set(stats.featureToggles);
|
||||
|
||||
featureTogglesArchivedTotal.reset();
|
||||
featureTogglesArchivedTotal.set(stats.archivedFeatureToggles);
|
||||
@ -495,7 +493,7 @@ export default class MetricsMonitor {
|
||||
});
|
||||
|
||||
eventStore.on(FEATURE_CREATED, ({ featureName, project }) => {
|
||||
featureToggleUpdateTotal.increment({
|
||||
featureFlagUpdateTotal.increment({
|
||||
toggle: featureName,
|
||||
project,
|
||||
environment: 'n/a',
|
||||
@ -503,7 +501,7 @@ export default class MetricsMonitor {
|
||||
});
|
||||
});
|
||||
eventStore.on(FEATURE_VARIANTS_UPDATED, ({ featureName, project }) => {
|
||||
featureToggleUpdateTotal.increment({
|
||||
featureFlagUpdateTotal.increment({
|
||||
toggle: featureName,
|
||||
project,
|
||||
environment: 'n/a',
|
||||
@ -511,7 +509,7 @@ export default class MetricsMonitor {
|
||||
});
|
||||
});
|
||||
eventStore.on(FEATURE_METADATA_UPDATED, ({ featureName, project }) => {
|
||||
featureToggleUpdateTotal.increment({
|
||||
featureFlagUpdateTotal.increment({
|
||||
toggle: featureName,
|
||||
project,
|
||||
environment: 'n/a',
|
||||
@ -519,7 +517,7 @@ export default class MetricsMonitor {
|
||||
});
|
||||
});
|
||||
eventStore.on(FEATURE_UPDATED, ({ featureName, project }) => {
|
||||
featureToggleUpdateTotal.increment({
|
||||
featureFlagUpdateTotal.increment({
|
||||
toggle: featureName,
|
||||
project,
|
||||
environment: 'default',
|
||||
@ -533,7 +531,7 @@ export default class MetricsMonitor {
|
||||
environment,
|
||||
cachedEnvironments,
|
||||
);
|
||||
featureToggleUpdateTotal.increment({
|
||||
featureFlagUpdateTotal.increment({
|
||||
toggle: featureName,
|
||||
project,
|
||||
environment,
|
||||
@ -548,7 +546,7 @@ export default class MetricsMonitor {
|
||||
environment,
|
||||
cachedEnvironments,
|
||||
);
|
||||
featureToggleUpdateTotal.increment({
|
||||
featureFlagUpdateTotal.increment({
|
||||
toggle: featureName,
|
||||
project,
|
||||
environment,
|
||||
@ -563,7 +561,7 @@ export default class MetricsMonitor {
|
||||
environment,
|
||||
cachedEnvironments,
|
||||
);
|
||||
featureToggleUpdateTotal.increment({
|
||||
featureFlagUpdateTotal.increment({
|
||||
toggle: featureName,
|
||||
project,
|
||||
environment,
|
||||
@ -578,7 +576,7 @@ export default class MetricsMonitor {
|
||||
environment,
|
||||
cachedEnvironments,
|
||||
);
|
||||
featureToggleUpdateTotal.increment({
|
||||
featureFlagUpdateTotal.increment({
|
||||
toggle: featureName,
|
||||
project,
|
||||
environment,
|
||||
@ -593,7 +591,7 @@ export default class MetricsMonitor {
|
||||
environment,
|
||||
cachedEnvironments,
|
||||
);
|
||||
featureToggleUpdateTotal.increment({
|
||||
featureFlagUpdateTotal.increment({
|
||||
toggle: featureName,
|
||||
project,
|
||||
environment,
|
||||
@ -602,7 +600,7 @@ export default class MetricsMonitor {
|
||||
},
|
||||
);
|
||||
eventStore.on(FEATURE_ARCHIVED, ({ featureName, project }) => {
|
||||
featureToggleUpdateTotal.increment({
|
||||
featureFlagUpdateTotal.increment({
|
||||
toggle: featureName,
|
||||
project,
|
||||
environment: 'n/a',
|
||||
@ -610,7 +608,7 @@ export default class MetricsMonitor {
|
||||
});
|
||||
});
|
||||
eventStore.on(FEATURE_REVIVED, ({ featureName, project }) => {
|
||||
featureToggleUpdateTotal.increment({
|
||||
featureFlagUpdateTotal.increment({
|
||||
toggle: featureName,
|
||||
project,
|
||||
environment: 'n/a',
|
||||
@ -620,7 +618,7 @@ export default class MetricsMonitor {
|
||||
|
||||
eventBus.on(CLIENT_METRICS, (m: ValidatedClientMetrics) => {
|
||||
for (const entry of Object.entries(m.bucket.toggles)) {
|
||||
featureToggleUsageTotal.increment(
|
||||
featureFlagUsageTotal.increment(
|
||||
{
|
||||
toggle: entry[0],
|
||||
active: 'true',
|
||||
@ -628,7 +626,7 @@ export default class MetricsMonitor {
|
||||
},
|
||||
entry[1].yes,
|
||||
);
|
||||
featureToggleUsageTotal.increment(
|
||||
featureFlagUsageTotal.increment(
|
||||
{
|
||||
toggle: entry[0],
|
||||
active: 'false',
|
||||
|
@ -450,7 +450,7 @@ test('should grant user access to project', async () => {
|
||||
const projectRole = await accessService.getRoleByName(RoleName.MEMBER);
|
||||
await accessService.addUserToRole(sUser.id, projectRole.id, project);
|
||||
|
||||
// // Should be able to update feature toggles inside the project
|
||||
// // Should be able to update feature flags inside the project
|
||||
await hasCommonProjectAccess(sUser, project, true);
|
||||
|
||||
// Should not be able to admin the project itself.
|
||||
@ -472,7 +472,7 @@ test('should not get access if not specifying project', async () => {
|
||||
|
||||
await accessService.addUserToRole(sUser.id, projectRole.id, project);
|
||||
|
||||
// Should not be able to update feature toggles outside project
|
||||
// Should not be able to update feature flags outside project
|
||||
await hasCommonProjectAccess(sUser, undefined, false);
|
||||
});
|
||||
|
||||
@ -766,7 +766,7 @@ test('Should be denied access to delete a role that is in use', async () => {
|
||||
}
|
||||
});
|
||||
|
||||
test('Should be denied move feature toggle to project where the user does not have access', async () => {
|
||||
test('Should be denied move feature flag to project where the user does not have access', async () => {
|
||||
const user = editorUser;
|
||||
const editorUser2 = await createUser(editorRole.id);
|
||||
|
||||
@ -787,18 +787,18 @@ test('Should be denied move feature toggle to project where the user does not ha
|
||||
TEST_AUDIT_USER,
|
||||
);
|
||||
|
||||
const featureToggle = { name: 'moveableToggle' };
|
||||
const featureFlag = { name: 'moveableFlag' };
|
||||
|
||||
await featureToggleService.createFeatureToggle(
|
||||
projectOrigin.id,
|
||||
featureToggle,
|
||||
featureFlag,
|
||||
extractAuditInfoFromUser(user),
|
||||
);
|
||||
|
||||
try {
|
||||
await projectService.changeProject(
|
||||
projectDest.id,
|
||||
featureToggle.name,
|
||||
featureFlag.name,
|
||||
user,
|
||||
projectOrigin.id,
|
||||
TEST_AUDIT_USER,
|
||||
@ -812,7 +812,7 @@ test('Should be denied move feature toggle to project where the user does not ha
|
||||
}
|
||||
});
|
||||
|
||||
test('Should be allowed move feature toggle to project when the user has access', async () => {
|
||||
test('Should be allowed move feature flag to project when the user has access', async () => {
|
||||
const user = editorUser;
|
||||
|
||||
const projectOrigin = {
|
||||
@ -836,17 +836,17 @@ test('Should be allowed move feature toggle to project when the user has access'
|
||||
extractAuditInfoFromUser(user),
|
||||
);
|
||||
|
||||
const featureToggle = { name: 'moveableToggle2' };
|
||||
const featureFlag = { name: 'moveableFlag2' };
|
||||
|
||||
await featureToggleService.createFeatureToggle(
|
||||
projectOrigin.id,
|
||||
featureToggle,
|
||||
featureFlag,
|
||||
extractAuditInfoFromUser(user),
|
||||
);
|
||||
|
||||
await projectService.changeProject(
|
||||
projectDest.id,
|
||||
featureToggle.name,
|
||||
featureFlag.name,
|
||||
user,
|
||||
projectOrigin.id,
|
||||
extractAuditInfoFromUser(user),
|
||||
@ -921,7 +921,7 @@ test('Should not be allowed to delete a project role', async () => {
|
||||
}
|
||||
});
|
||||
|
||||
test('Should be allowed move feature toggle to project when given access through group', async () => {
|
||||
test('Should be allowed move feature flag to project when given access through group', async () => {
|
||||
const project = {
|
||||
id: 'yet-another-project1',
|
||||
name: 'yet-another-project1',
|
||||
@ -976,13 +976,13 @@ test('Should not lose user role access when given permissions from a group', asy
|
||||
|
||||
test('Should allow user to take multiple group roles and have expected permissions on each project', async () => {
|
||||
const projectForCreate = {
|
||||
id: 'project-that-should-have-create-toggle-permission',
|
||||
name: 'project-that-should-have-create-toggle-permission',
|
||||
id: 'project-that-should-have-create-flag-permission',
|
||||
name: 'project-that-should-have-create-flag-permission',
|
||||
description: 'Blah',
|
||||
};
|
||||
const projectForDelete = {
|
||||
id: 'project-that-should-have-delete-toggle-permission',
|
||||
name: 'project-that-should-have-delete-toggle-permission',
|
||||
id: 'project-that-should-have-delete-flag-permission',
|
||||
name: 'project-that-should-have-delete-flag-permission',
|
||||
description: 'Blah',
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user