mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-05 17:53:12 +02:00
feat: update impl up to API level.
This commit is contained in:
parent
8169ea6996
commit
a4ec4a0dbb
@ -369,7 +369,7 @@ export class SegmentsController extends Controller {
|
|||||||
featureName: strategy.featureName,
|
featureName: strategy.featureName,
|
||||||
strategyName: strategy.strategyName,
|
strategyName: strategy.strategyName,
|
||||||
environment: strategy.environment,
|
environment: strategy.environment,
|
||||||
changeRequestIds: strategy.changeRequestIds,
|
changeRequests: strategy.changeRequests,
|
||||||
});
|
});
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
|
@ -429,6 +429,7 @@ test('Should show usage in features and projects', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('detect strategy usage in change requests', () => {
|
describe('detect strategy usage in change requests', () => {
|
||||||
|
const CR_TITLE = 'My change request';
|
||||||
const CR_ID = 54321;
|
const CR_ID = 54321;
|
||||||
let user;
|
let user;
|
||||||
|
|
||||||
@ -445,7 +446,7 @@ describe('detect strategy usage in change requests', () => {
|
|||||||
created_by: user.id,
|
created_by: user.id,
|
||||||
created_at: '2023-01-01 00:00:00',
|
created_at: '2023-01-01 00:00:00',
|
||||||
min_approvals: 1,
|
min_approvals: 1,
|
||||||
title: 'My change request',
|
title: CR_TITLE,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
@ -529,7 +530,7 @@ describe('detect strategy usage in change requests', () => {
|
|||||||
featureName: toggle.name,
|
featureName: toggle.name,
|
||||||
projectId: 'default',
|
projectId: 'default',
|
||||||
strategyName: 'flexibleRollout',
|
strategyName: 'flexibleRollout',
|
||||||
changeRequestIds: [CR_ID],
|
changeRequests: [{ id: CR_ID, title: CR_TITLE }],
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(strategies).toStrictEqual([]);
|
expect(strategies).toStrictEqual([]);
|
||||||
@ -578,7 +579,10 @@ describe('detect strategy usage in change requests', () => {
|
|||||||
await fetchSegmentStrategies(segment.id);
|
await fetchSegmentStrategies(segment.id);
|
||||||
|
|
||||||
expect(changeRequestStrategies).toMatchObject([
|
expect(changeRequestStrategies).toMatchObject([
|
||||||
{ id: strategyId, changeRequestIds: [CR_ID] },
|
{
|
||||||
|
id: strategyId,
|
||||||
|
changeRequests: [{ id: CR_ID, title: CR_TITLE }],
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
expect(strategies).toStrictEqual([]);
|
expect(strategies).toStrictEqual([]);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user