-
Notifications
You must be signed in to change notification settings - Fork 13k
chore: add new icons to abac rooms #37424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7357aa8
chore: add new icons to abac rooms
MartinSchoeler a296f9c
chore: remove old tags
MartinSchoeler 662cc95
test: use correct ts-expect-error
MartinSchoeler 748ea51
Merge branch 'develop' into chore/abac-icons
kodiakhq[bot] 5ecc468
Merge branch 'develop' into chore/abac-icons
kodiakhq[bot] ea2a41d
Merge branch 'develop' into chore/abac-icons
kodiakhq[bot] e9d47f9
Merge branch 'develop' into chore/abac-icons
kodiakhq[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
apps/meteor/client/components/ABAC/__snapshots__/ABACHeaderTag.spec.tsx.snap
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| import { useRoomIcon } from './useRoomIcon'; | ||
| import { createFakeRoom } from '../../tests/mocks/data'; | ||
|
|
||
| const mockRooms = { | ||
| public: createFakeRoom({ | ||
| t: 'c', | ||
| name: 'public', | ||
| teamMain: false, | ||
| // @ts-expect-error TODO: Implement ABAC attributes in rooms | ||
| abacAttributes: false, | ||
| }), | ||
| private: createFakeRoom({ | ||
| t: 'p', | ||
| name: 'private', | ||
| teamMain: false, | ||
| // @ts-expect-error TODO: Implement ABAC attributes in rooms | ||
| abacAttributes: false, | ||
| }), | ||
| team: createFakeRoom({ | ||
| t: 'c', | ||
| name: 'team', | ||
| teamMain: true, | ||
| // @ts-expect-error TODO: Implement ABAC attributes in rooms | ||
| abacAttributes: false, | ||
| }), | ||
| direct: createFakeRoom({ | ||
| t: 'd', | ||
| name: 'direct', | ||
| teamMain: false, | ||
| // @ts-expect-error TODO: Implement ABAC attributes in rooms | ||
| abacAttributes: false, | ||
| }), | ||
| directMultiple: createFakeRoom({ | ||
| t: 'd', | ||
| name: 'direct-multiple', | ||
| teamMain: false, | ||
| // @ts-expect-error TODO: Implement ABAC attributes in rooms | ||
| abacAttributes: false, | ||
| uids: ['user1', 'user2', 'user3'], | ||
| }), | ||
| federated: createFakeRoom({ | ||
| t: 'c', | ||
| name: 'federated', | ||
| teamMain: false, | ||
| // @ts-expect-error TODO: Implement ABAC attributes in rooms | ||
| abacAttributes: false, | ||
| federated: true, | ||
| }), | ||
| abacRoom: createFakeRoom({ | ||
| t: 'c', | ||
| name: 'abac-room', | ||
| teamMain: false, | ||
| // @ts-expect-error TODO: Implement ABAC attributes in rooms | ||
| abacAttributes: true, | ||
| }), | ||
| abacTeamRoom: createFakeRoom({ | ||
| t: 'c', | ||
| name: 'abac-team-room', | ||
| teamMain: true, | ||
| // @ts-expect-error TODO: Implement ABAC attributes in rooms | ||
| abacAttributes: true, | ||
| }), | ||
| }; | ||
|
|
||
| const expectedResults = { | ||
| public: { name: 'hash' }, | ||
| private: { name: 'hashtag-lock' }, | ||
| team: { name: 'team' }, | ||
| federated: { name: 'globe' }, | ||
| abacRoom: { name: 'hash-shield' }, | ||
| abacTeamRoom: { name: 'team-shield' }, | ||
| direct: { name: 'at' }, | ||
| directMultiple: { name: 'balloon' }, | ||
| }; | ||
|
|
||
| describe('useRoomIcon', () => { | ||
| it('should return the correct icon for each room', () => { | ||
| Object.entries(mockRooms).forEach(([key, room]) => { | ||
| const result = useRoomIcon(room); | ||
| expect(result).toEqual(expectedResults[key as keyof typeof expectedResults]); | ||
| }); | ||
| }); | ||
| }); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.