mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
feat: archived features will be included in onboarding (#8350)
Now when you are finished onboarding and you archive feature, you will not restart onboarding.
This commit is contained in:
parent
38b33aa032
commit
e8e005daa4
@ -30,7 +30,9 @@ afterAll(async () => {
|
||||
}
|
||||
});
|
||||
|
||||
beforeEach(async () => {});
|
||||
beforeEach(async () => {
|
||||
await featureToggleStore.deleteAll();
|
||||
});
|
||||
|
||||
test('can get instance onboarding durations', async () => {
|
||||
const initialResult =
|
||||
@ -153,3 +155,26 @@ test('can get project onboarding status', async () => {
|
||||
status: 'onboarded',
|
||||
});
|
||||
});
|
||||
|
||||
test('archived feature counts as onboarded', async () => {
|
||||
await featureToggleStore.create('default', {
|
||||
name: 'my-flag',
|
||||
createdByUserId: SYSTEM_USER.id,
|
||||
});
|
||||
|
||||
await lastSeenStore.setLastSeen([
|
||||
{
|
||||
environment: 'default',
|
||||
featureName: 'my-flag',
|
||||
},
|
||||
]);
|
||||
|
||||
await featureToggleStore.archive('my-flag');
|
||||
|
||||
const onboardedResult =
|
||||
await onboardingReadModel.getOnboardingStatusForProject('default');
|
||||
|
||||
expect(onboardedResult).toMatchObject({
|
||||
status: 'onboarded',
|
||||
});
|
||||
});
|
||||
|
@ -86,7 +86,6 @@ export class OnboardingReadModel implements IOnboardingReadModel {
|
||||
const feature = await this.db('features')
|
||||
.select('name')
|
||||
.where('project', projectId)
|
||||
.where('archived_at', null)
|
||||
.first();
|
||||
|
||||
if (!feature) {
|
||||
|
Loading…
Reference in New Issue
Block a user