This commit is contained in:
Raghunandan Balachandran
2020-02-04 12:20:37 +01:00
parent 693979fca1
commit 33a811c978
2 changed files with 13 additions and 9 deletions
@@ -5,6 +5,6 @@ import LoginComponent from './LoginComponent';
describe('LoginComponent', () => {
it('should render', () => {
const rendered = render(<LoginComponent />);
expect(rendered.getByText('Username')).toBeInTheDocument();
expect(rendered.getByText('Login')).toBeInTheDocument();
});
});
@@ -1,15 +1,19 @@
import React, { FC } from 'react';
import React, { FC, Fragment } from 'react';
import Button from '@material-ui/core/Button';
import TextField from '@material-ui/core/TextField';
const LoginComponent: FC<{}> = () => {
return (
<Button
variant="contained"
color="primary"
onClick={() => window.location.href = "/"}
>
Login
</Button>
<Fragment>
<TextField variant="outlined" label="Username: " />
<Button
variant="contained"
color="primary"
onClick={() => window.location.href = "/"}
>
Login
</Button>
</Fragment>
);
};