-
Notifications
You must be signed in to change notification settings - Fork 9
VIDSOL-10: VERA does not display special characters properly in Participant List, Muted Video Publisher #210
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,27 +74,161 @@ describe('getInitials', () => { | |
| }); | ||
| }); | ||
|
|
||
| it('returns initials for a simgle character first name', () => { | ||
| it('returns initials for a single character first name', () => { | ||
| const username = 'l'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('L'); | ||
| }); | ||
|
|
||
| it('returns initials for a simgle character last name', () => { | ||
| it('returns initials for a single character last name', () => { | ||
| const username = 'Daniel Michael B'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('DB'); | ||
| }); | ||
|
|
||
| it('returns initials for a simgle character first and last name', () => { | ||
| it('returns initials for a single character first and last name', () => { | ||
| const username = 's d'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('SD'); | ||
| }); | ||
|
|
||
| it('handles Unicode characters with accents', () => { | ||
behei-vonage marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| const username = 'Òscar'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('Ò'); | ||
| }); | ||
|
|
||
| it('handles Unicode characters in multiple names', () => { | ||
| const username = 'José María'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('JM'); | ||
| }); | ||
|
|
||
| it('handles various accented characters', () => { | ||
| const testCases = [ | ||
| { username: 'François Müller', expected: 'FM' }, | ||
| { username: 'Åse Björk', expected: 'ÅB' }, | ||
| { username: 'Zürich', expected: 'Z' }, | ||
| { username: 'Naïve Café', expected: 'NC' }, | ||
| { username: 'Señor López', expected: 'SL' }, | ||
| ]; | ||
|
|
||
| testCases.forEach(({ username, expected }) => { | ||
| const initials = getInitials(username); | ||
| expect(initials).toBe(expected); | ||
| }); | ||
| }); | ||
|
|
||
| it('handles hyphenated names with accents', () => { | ||
| const username = 'José-María González'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('JG'); | ||
| }); | ||
|
|
||
| it('handles combining diacritical marks', () => { | ||
behei-vonage marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| const username = 'André Müller'; | ||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('AM'); | ||
| }); | ||
|
|
||
| it('handles Cyrillic characters', () => { | ||
| const username = 'Андрій Шевченко'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('АШ'); | ||
| }); | ||
|
|
||
| it('handles names with emojis at the beginning', () => { | ||
| const username = '😊 John Doe'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('JD'); | ||
| }); | ||
|
|
||
| it('handles names with emojis at the end', () => { | ||
| const username = 'Jane Smith 🎉'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('JS'); | ||
| }); | ||
|
|
||
| it('handles names with emojis in between', () => { | ||
| const username = 'Bob 🚀 Wilson'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('BW'); | ||
| }); | ||
|
|
||
| it('handles names with multiple emojis', () => { | ||
| const username = '🌟 Alice 💫 Cooper 🎭'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('AC'); | ||
| }); | ||
|
|
||
| it('handles names that are only emojis', () => { | ||
| const username = '😊 🎉'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe(''); | ||
| }); | ||
|
|
||
| it('handles mixed emoji and unicode text', () => { | ||
| const username = '🇫🇷 François 🎨 García'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('FG'); | ||
| }); | ||
|
|
||
| it('handles Arabic characters', () => { | ||
| const username = 'أحمد محمد'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('أم'); | ||
| }); | ||
|
|
||
| it('handles Chinese characters', () => { | ||
| const username = '张三 李四'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('张李'); | ||
| }); | ||
|
|
||
| it('handles Japanese characters', () => { | ||
| const username = 'たなか はなこ'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('たは'); | ||
| }); | ||
|
|
||
| it('handles Korean characters', () => { | ||
| const username = '김민수 박영희'; | ||
|
|
||
| const initials = getInitials(username); | ||
|
|
||
| expect(initials).toBe('김박'); | ||
| }); | ||
| }); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we add a test for unicode emojis? It's supported in the SDK, I'm not sure what the behavior is in VERA. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the behavior in the SDK seems strange. It supports only one emoji as tested with meet. For VERA, if someone does add some emoji such as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No love for 🇱🇦 😢 ? |
||
Uh oh!
There was an error while loading. Please reload this page.