1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: Performance improvements for demo and docs update (#4454)

This commit is contained in:
Mateusz Kwasniewski 2023-08-09 12:58:03 +02:00 committed by GitHub
parent b927ef8b70
commit c549280e31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 10 deletions

View File

@ -266,6 +266,12 @@ const copyButtonsActiveInOtherEnv = async () => {
expect(customEnvStrategyCopyButton).not.toBeDisabled();
};
const openEnvironments = async (envNames: string[]) => {
for (const env of envNames) {
(await screen.findAllByText(env))[1].click();
}
};
test('open mode + non-project member can perform basic change request actions', async () => {
const project = 'default';
const featureName = 'test';
@ -289,6 +295,8 @@ test('open mode + non-project member can perform basic change request actions',
</UnleashUiSetup>
);
await openEnvironments(['development', 'production', 'custom']);
await strategiesAreDisplayed('UserIDs', 'Standard');
await deleteButtonsActiveInChangeRequestEnv();
await copyButtonsActiveInOtherEnv();
@ -317,6 +325,8 @@ test('protected mode + project member can perform basic change request actions',
</UnleashUiSetup>
);
await openEnvironments(['development', 'production', 'custom']);
await strategiesAreDisplayed('UserIDs', 'Standard');
await deleteButtonsActiveInChangeRequestEnv();
await copyButtonsActiveInOtherEnv();
@ -345,6 +355,8 @@ test('protected mode + non-project member cannot perform basic change request ac
</UnleashUiSetup>
);
await openEnvironments(['development', 'production', 'custom']);
await strategiesAreDisplayed('UserIDs', 'Standard');
await deleteButtonsInactiveInChangeRequestEnv();
await copyButtonsActiveInOtherEnv();

View File

@ -429,19 +429,18 @@ export const TOPICS: ITutorialTopic[] = [
<>
<Description>
<a
href="https://docs.getunleash.io/reference/feature-toggle-variants"
href="https://docs.getunleash.io/reference/strategy-variants"
target="_blank"
rel="noreferrer"
>
Feature toggle variants
Strategy variants
</a>{' '}
allow you to define different values for a feature
toggle. They can be used for A/B testing or
allow you to define different values for a matching
strategy. They can be used for A/B testing or
segmenting your users.
</Description>
<Description sx={{ mt: 1 }}>
Let's try adding a variant to a feature toggle,
along with an override so our user can see it.
Let's try adding a variant to a strategy.
</Description>
</>
),

View File

@ -141,6 +141,7 @@ const FeatureOverviewEnvironment = ({
show={
<StyledFeatureOverviewEnvironment enabled={env.enabled}>
<StyledAccordion
TransitionProps={{ mountOnEnter: true }}
data-testid={`${FEATURE_ENVIRONMENT_ACCORDION}_${env.name}`}
className={`environment-accordion ${
env.enabled ? '' : 'accordion-disabled'

View File

@ -1,9 +1,9 @@
---
title: Feature Strategy Variants
title: Strategy Variants
---
:::info Availability
**Feature strategy variants** were first introduced in Unleash 5.4.
**Strategy variants** were first introduced in Unleash 5.4.
:::
Gradual rollout strategies in Unleash can have _strategy variants_. _Strategy variants_ allow each matching activation strategy to return not just simple enabled/disabled status, but
@ -78,7 +78,7 @@ Since strategy variants are part of activation strategies they have full access
In the Unleash UI, you can configure variants by navigating to the gradual strategy view, and then choosing the 'Variants' section.
![strategy_variants](/img/strategy-variants.png 'Feature Strategy Variants')
![strategy_variants](/img/strategy-variants.png 'Strategy Variants')
## The `disabled` variant

View File

@ -330,7 +330,7 @@ module.exports = {
'reference/impression-data',
'reference/custom-activation-strategies',
'reference/environments',
'reference/feature-strategy-variants',
'reference/strategy-variants',
'reference/feature-toggles',
'reference/feature-toggle-types',
'reference/feature-toggle-variants',