-
Notifications
You must be signed in to change notification settings - Fork 17
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
BC-8193 - Expanding and registering BBB #5354
Merged
Merged
Changes from 3 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
c0095fc
implementing board videoconf in VC service with tests
MartinSchuhmacher 0ddbb76
recent state for implementing board authorization in VC
MartinSchuhmacher 777e81b
implementing VC element and room + VC element scope
MartinSchuhmacher 1e2e125
adjusting VC scope to board element
MartinSchuhmacher 8bd7dba
Merge branch 'main' into BC-8193-start-bbb
MartinSchuhmacher 23be7be
adding VC response and node
MartinSchuhmacher 2a5dd3c
Merge branch 'main' into BC-8193-start-bbb
MartinSchuhmacher 7ffc545
adding more tests
MartinSchuhmacher e110ae3
Merge branch 'main' into BC-8193-start-bbb
MartinSchuhmacher 633d4af
adjusting VC service
MartinSchuhmacher 0dea59c
adding api tests for VC scopes
MartinSchuhmacher 232ab4e
Merge branch 'main' into BC-8193-start-bbb
MartinSchuhmacher d8b752a
fixing rename issues
MartinSchuhmacher b27c068
adding unit tests for coverage
MartinSchuhmacher 647dbd2
Merge branch 'main' into BC-8193-start-bbb
MartinSchuhmacher 802ad7a
add school id indexes
uidp ab4ea5a
Merge branch 'main' into BC-8193-start-bbb
MartinSchuhmacher 48c38b7
adding yellow to room color selector
MartinSchuhmacher d42ec95
repositioning of yellow color in room color picker
MartinSchuhmacher 1d536ed
adjusting after review feedback
MartinSchuhmacher dc7c768
Merge branch 'main' into BC-8193-start-bbb
MartinSchuhmacher 66b7a98
removing url property from VC element
MartinSchuhmacher d830df8
implementing review feedback
MartinSchuhmacher 07a775e
Merge branch 'main' into BC-8193-start-bbb
MartinSchuhmacher b20cc2d
fixing merge conflicts
MartinSchuhmacher 9c7ed6e
adding more tests for coverage
MartinSchuhmacher 013c5f6
seting type alias for better maintainability
MartinSchuhmacher 7b305ce
Merge branch 'main' into BC-8193-start-bbb
MartinSchuhmacher 594e25e
implementing FEATURE_COLUMN_BOARD_VIDEOCONFERENCE_ENABLED for FE usage
MartinSchuhmacher 59c42f5
adding missing dev activation for FE env
MartinSchuhmacher b177a9c
fixing typo
MartinSchuhmacher 1c69034
Merge branch 'main' into BC-8193-start-bbb
MartinSchuhmacher 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 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
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
54 changes: 54 additions & 0 deletions
54
apps/server/src/modules/board/domain/video-conference-element.do.spec.ts
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { VideoConferenceElement, isVideoConferenceElement } from './video-conference-element.do'; | ||
import { BoardNodeProps } from './types/board-node-props'; | ||
|
||
describe('VideoConferenceElement', () => { | ||
let videoConferenceElement: VideoConferenceElement; | ||
|
||
const boardNodeProps: BoardNodeProps = { | ||
id: '1', | ||
path: '', | ||
level: 1, | ||
position: 1, | ||
children: [], | ||
createdAt: new Date(), | ||
updatedAt: new Date(), | ||
}; | ||
|
||
beforeEach(() => { | ||
videoConferenceElement = new VideoConferenceElement({ | ||
...boardNodeProps, | ||
url: 'https://example.com', | ||
title: 'Example', | ||
}); | ||
}); | ||
|
||
it('should be instance of VideoConferenceElement', () => { | ||
expect(isVideoConferenceElement(videoConferenceElement)).toBe(true); | ||
}); | ||
|
||
it('should not be instance of VideoConferenceElement', () => { | ||
expect(isVideoConferenceElement({})).toBe(false); | ||
}); | ||
|
||
it('should return url', () => { | ||
expect(videoConferenceElement.url).toBe('https://example.com'); | ||
}); | ||
|
||
it('should set url', () => { | ||
videoConferenceElement.url = 'https://newurl.com'; | ||
expect(videoConferenceElement.url).toBe('https://newurl.com'); | ||
}); | ||
|
||
it('should return title', () => { | ||
expect(videoConferenceElement.title).toBe('Example'); | ||
}); | ||
|
||
it('should set title', () => { | ||
videoConferenceElement.title = 'New title'; | ||
expect(videoConferenceElement.title).toBe('New title'); | ||
}); | ||
|
||
it('should not have child', () => { | ||
expect(videoConferenceElement.canHaveChild()).toBe(false); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
apps/server/src/modules/board/domain/video-conference-element.do.ts
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { BoardNode } from './board-node.do'; | ||
import type { VideoConferenceElementProps } from './types'; | ||
|
||
export class VideoConferenceElement extends BoardNode<VideoConferenceElementProps> { | ||
get url(): string { | ||
return this.props.url ?? ''; | ||
} | ||
|
||
set url(value: string) { | ||
MartinSchuhmacher marked this conversation as resolved.
Show resolved
Hide resolved
|
||
this.props.url = value; | ||
} | ||
|
||
get title(): string { | ||
return this.props.title ?? ''; | ||
} | ||
|
||
set title(value: string) { | ||
this.props.title = value; | ||
} | ||
|
||
canHaveChild(): boolean { | ||
return false; | ||
} | ||
} | ||
|
||
export const isVideoConferenceElement = (reference: unknown): reference is VideoConferenceElement => | ||
reference instanceof VideoConferenceElement; |
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
20 changes: 20 additions & 0 deletions
20
apps/server/src/modules/board/testing/video-conference-element.factory.ts
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { ObjectId } from '@mikro-orm/mongodb'; | ||
import { BaseFactory } from '@shared/testing'; | ||
import { ROOT_PATH, VideoConferenceElement, VideoConferenceElementProps } from '../domain'; | ||
|
||
export const videoConferenceElementFactory = BaseFactory.define<VideoConferenceElement, VideoConferenceElementProps>( | ||
VideoConferenceElement, | ||
({ sequence }) => { | ||
return { | ||
id: new ObjectId().toHexString(), | ||
path: ROOT_PATH, | ||
level: 0, | ||
position: 0, | ||
children: [], | ||
createdAt: new Date(), | ||
updatedAt: new Date(), | ||
title: `video conference element #${sequence}`, | ||
url: `url #${sequence}`, | ||
}; | ||
} | ||
); |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a fallback for url and title
... ?? ''
.Is there a reason not to trust the type system?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, agree, if we use types we should trust on that