Skip to content

Commit

Permalink
fix test which wasn't testing anything
Browse files Browse the repository at this point in the history
  • Loading branch information
roro-lv committed Mar 29, 2022
1 parent ddfe066 commit 6516558
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/frontend/components/LiveVideoPanel/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ import { wrapInIntlProvider } from 'utils/tests/intl';
import { DecodedJwt } from 'types/jwt';
import { LiveVideoPanel } from '.';

const mockAskingParticipant = participantMockFactory();
const mockParticipant = participantMockFactory();

const mockVideo = videoMockFactory({
participants_asking_to_join: [mockAskingParticipant],
participants_in_discussion: [mockParticipant],
});

Expand Down Expand Up @@ -121,7 +123,10 @@ describe('<LiveVideoPanel />', () => {
screen.getByRole('tab', { name: 'chat' });
screen.getByRole('tab', { name: 'viewers' });

screen.getByText('On stage');
screen.getByText(mockParticipant.name);
expect(screen.queryByText('Demands')).toEqual(null);
expect(screen.queryByText(mockAskingParticipant.name)).toEqual(null);
});

it('renders the correct viewers list if the user is an instructor', () => {
Expand Down Expand Up @@ -157,7 +162,10 @@ describe('<LiveVideoPanel />', () => {
screen.getByRole('tab', { name: 'chat' });
screen.getByRole('tab', { name: 'viewers' });

screen.getByText('On stage');
screen.getByText(mockParticipant.name);
screen.getByText('Demands');
screen.getByText(mockAskingParticipant.name);
});

it('does not render tabs with only one item available', () => {
Expand Down

0 comments on commit 6516558

Please sign in to comment.