Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import DeviceSelectionScreen from './DeviceSelectionScreen';
import CircularProgress from '@material-ui/core/CircularProgress';
import { shallow } from 'enzyme';
import { Steps } from '../PreJoinScreens';
import { useAppState } from '../../../state';
Expand Down Expand Up @@ -35,8 +36,8 @@ describe('the DeviceSelectionScreen component', () => {

const wrapper = shallow(<DeviceSelectionScreen name="test name" roomName="test room name" setStep={() => {}} />);

it('should disable the Join Now button', () => {
expect(wrapper.find({ children: 'Join Now' }).prop('disabled')).toBe(true);
it('should show the loading screen', () => {
expect(wrapper.find(CircularProgress).exists()).toBe(true);
});

it('should disable the desktop and mobile toggle video buttons', () => {
Expand Down Expand Up @@ -79,8 +80,8 @@ describe('the DeviceSelectionScreen component', () => {
mockUseAppState.mockImplementationOnce(() => ({ getToken: mockGetToken, isFetching: true }));
const wrapper = shallow(<DeviceSelectionScreen name="test name" roomName="test room name" setStep={() => {}} />);

it('should disable the Join Now button', () => {
expect(wrapper.find({ children: 'Join Now' }).prop('disabled')).toBe(true);
it('should show the loading screen', () => {
expect(wrapper.find(CircularProgress).exists()).toBe(true);
});

it('should disable the desktop and mobile toggle video buttons', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { makeStyles, Typography, Grid, Button, Theme, Hidden } from '@material-ui/core';
import CircularProgress from '@material-ui/core/CircularProgress';
import LocalVideoPreview from './LocalVideoPreview/LocalVideoPreview';
import SettingsMenu from './SettingsMenu/SettingsMenu';
import { Steps } from '../PreJoinScreens';
Expand Down Expand Up @@ -71,6 +72,21 @@ export default function DeviceSelectionScreen({ name, roomName, setStep }: Devic
});
};

if (isFetching || isConnecting) {
return (
<Grid container justify="center" alignItems="center" direction="column" style={{ height: '100%' }}>
<div>
<CircularProgress variant="indeterminate" />
</div>
<div>
<Typography variant="body2" style={{ fontWeight: 'bold', fontSize: '16px' }}>
Joining Meeting
</Typography>
</div>
</Grid>
);
}

return (
<>
<Typography variant="h5" className={classes.gutterBottom}>
Expand Down