Test: LoginForm snapshot
This commit is contained in:
parent
49589e1e7c
commit
4a01b80ede
2 changed files with 71 additions and 0 deletions
|
@ -0,0 +1,60 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<LoginForm /> renders correctly 1`] = `
|
||||
<form
|
||||
className="simple_form new_user"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
<fieldset
|
||||
disabled={false}
|
||||
>
|
||||
<div
|
||||
className="fields-group"
|
||||
>
|
||||
<div
|
||||
className="input email optional user_email"
|
||||
>
|
||||
<input
|
||||
aria-label="Username"
|
||||
className="string email optional"
|
||||
name="username"
|
||||
placeholder="Username"
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="input password optional user_password"
|
||||
>
|
||||
<input
|
||||
aria-label="Password"
|
||||
className="password optional"
|
||||
name="password"
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
/>
|
||||
</div>
|
||||
<p
|
||||
className="hint subtle-hint"
|
||||
>
|
||||
<a
|
||||
href="/auth/reset_password"
|
||||
onClick={[Function]}
|
||||
>
|
||||
Trouble logging in?
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div
|
||||
className="actions"
|
||||
>
|
||||
<button
|
||||
className="btn button button-primary"
|
||||
name="button"
|
||||
type="submit"
|
||||
>
|
||||
Log in
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
`;
|
|
@ -0,0 +1,11 @@
|
|||
import React from 'react';
|
||||
import LoginForm from '../login_form';
|
||||
import { createComponent } from 'soapbox/test_helpers';
|
||||
|
||||
describe('<LoginForm />', () => {
|
||||
it('renders correctly', () => {
|
||||
expect(createComponent(
|
||||
<LoginForm />
|
||||
).toJSON()).toMatchSnapshot();
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue