-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! ✨(front) manage chat user useParticipantsStore on disconnect
- Loading branch information
Showing
5 changed files
with
30 additions
and
0 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 |
---|---|---|
|
@@ -32,32 +32,37 @@ const mockedParticipantOnStage2 = participantMockFactory(); | |
|
||
const mockedParticipantOnStage1Full = { | ||
...mockedParticipantOnStage1, | ||
userJid: 'userJid-stage1', | ||
isInstructor: false, | ||
isOnStage: true, | ||
}; | ||
|
||
const mockedParticipantOnStage2Full = { | ||
...mockedParticipantOnStage2, | ||
userJid: 'userJid-stage2', | ||
isInstructor: false, | ||
isOnStage: true, | ||
}; | ||
|
||
const participant1 = { | ||
id: '[email protected]', | ||
userJid: 'userJid-student1', | ||
isInstructor: true, | ||
isOnStage: false, | ||
name: 'Student 1', | ||
}; | ||
|
||
const participant2 = { | ||
id: '[email protected]', | ||
userJid: 'userJid-student2', | ||
isInstructor: false, | ||
isOnStage: false, | ||
name: 'Student 2', | ||
}; | ||
|
||
const participant3 = { | ||
id: '[email protected]', | ||
userJid: 'userJid-student3', | ||
isInstructor: false, | ||
isOnStage: false, | ||
name: 'Student 3', | ||
|
@@ -230,12 +235,14 @@ describe('<ViewersList /> when user is an instructor', () => { | |
participants: [ | ||
{ | ||
id: 'id-anonymous', | ||
userJid: 'userJid-anonymous', | ||
isInstructor: false, | ||
isOnStage: false, | ||
name: anonymousName, | ||
}, | ||
{ | ||
id: 'id-named', | ||
userJid: 'userJid-anonymous', | ||
isInstructor: false, | ||
isOnStage: false, | ||
name: 'my name', | ||
|
@@ -269,6 +276,7 @@ describe('<ViewersList /> when user is a student', () => { | |
act(() => | ||
useParticipantsStore.getState().addParticipant({ | ||
id: '[email protected]', | ||
userJid: 'userJid-instructor', | ||
isInstructor: true, | ||
isOnStage: true, | ||
name: 'Instructor', | ||
|
@@ -279,6 +287,7 @@ describe('<ViewersList /> when user is a student', () => { | |
act(() => | ||
useParticipantsStore.getState().addParticipant({ | ||
id: '[email protected]', | ||
userJid: 'userJid-student1', | ||
isInstructor: false, | ||
isOnStage: false, | ||
name: 'Student 1', | ||
|
@@ -289,6 +298,7 @@ describe('<ViewersList /> when user is a student', () => { | |
act(() => | ||
useParticipantsStore.getState().addParticipant({ | ||
id: '[email protected]', | ||
userJid: 'userJid-student2', | ||
isInstructor: false, | ||
isOnStage: false, | ||
name: 'Student 2', | ||
|
@@ -304,6 +314,7 @@ describe('<ViewersList /> when user is a student', () => { | |
act(() => | ||
useParticipantsStore.getState().addParticipant({ | ||
id: '[email protected]', | ||
userJid: 'userJid-student2', | ||
isInstructor: false, | ||
isOnStage: false, | ||
name: 'Student 2', | ||
|
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 |
---|---|---|
|
@@ -2,41 +2,47 @@ import { useParticipantsStore } from '.'; | |
|
||
const participant1 = { | ||
id: '[email protected]', | ||
userJid: 'userJid-instructor1', | ||
isInstructor: true, | ||
isOnStage: true, | ||
name: 'Instructor 1', | ||
}; | ||
|
||
const participant2 = { | ||
id: '[email protected]', | ||
userJid: 'userJid-instructor2', | ||
isInstructor: true, | ||
isOnStage: true, | ||
name: 'Instructor 2', | ||
}; | ||
|
||
const participant3 = { | ||
id: '[email protected]', | ||
userJid: 'userJid-student1', | ||
isInstructor: false, | ||
isOnStage: true, | ||
name: 'Student 1', | ||
}; | ||
|
||
const participant4 = { | ||
id: '[email protected]', | ||
userJid: 'userJid-student2', | ||
isInstructor: false, | ||
isOnStage: false, | ||
name: 'Student 2', | ||
}; | ||
|
||
const sameIdParticipant1 = { | ||
id: '[email protected]', | ||
userJid: 'userJid-instructor1', | ||
isInstructor: false, | ||
isOnStage: false, | ||
name: 'Generic participant', | ||
}; | ||
|
||
const sameNameParticipant1 = { | ||
id: '[email protected]', | ||
userJid: 'userJid-generic', | ||
isInstructor: false, | ||
isOnStage: false, | ||
name: 'Instructor 1', | ||
|