-
-
Notifications
You must be signed in to change notification settings - Fork 728
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: return latest project events (#8287)
- Loading branch information
Showing
7 changed files
with
105 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ afterAll(async () => { | |
beforeEach(async () => { | ||
await db.stores.featureToggleStore.deleteAll(); | ||
await db.stores.userStore.deleteAll(); | ||
await db.stores.eventStore.deleteAll(); | ||
}); | ||
|
||
test('should return personal dashboard with own flags and favorited flags', async () => { | ||
|
@@ -178,12 +179,41 @@ test('should return projects where users are part of a group', async () => { | |
|
||
test('should return personal dashboard project details', async () => { | ||
await loginUser('[email protected]'); | ||
|
||
await app.createFeature('log_feature_a'); | ||
await app.createFeature('log_feature_b'); | ||
await app.createFeature('log_feature_c'); | ||
|
||
const { body } = await app.request.get( | ||
`/api/admin/personal-dashboard/default`, | ||
); | ||
|
||
expect(body).toMatchObject({ | ||
owners: [{}], | ||
roles: [{}], | ||
latestEvents: [ | ||
{ | ||
createdBy: '[email protected]', | ||
summary: expect.stringContaining( | ||
'**[email protected]** created **[log_feature_c]', | ||
), | ||
}, | ||
{ | ||
createdBy: '[email protected]', | ||
summary: expect.stringContaining( | ||
'**[email protected]** created **[log_feature_b]', | ||
), | ||
}, | ||
{ | ||
createdBy: '[email protected]', | ||
summary: expect.stringContaining( | ||
'**[email protected]** created **[log_feature_a]', | ||
), | ||
}, | ||
{ | ||
createdBy: 'unleash_system_user', | ||
summary: '**unleash_system_user** created user ****', | ||
}, | ||
], | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters