Fix test
This commit is contained in:
+1
-1
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user