-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e33ae8e
commit b68d5ea
Showing
4 changed files
with
299 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react'; | ||
import ShallowRenderer from 'react-test-renderer/shallow'; | ||
import Register from "../register/Register"; | ||
|
||
test('renders Register', () => { | ||
const renderer = new ShallowRenderer(); | ||
renderer.render(<Register />); | ||
expect(renderer.getRenderOutput()).toMatchSnapshot() | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,273 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`renders Register 1`] = ` | ||
<div | ||
className="container" | ||
> | ||
<div | ||
className="row mb-5" | ||
> | ||
<div | ||
className="col-lg-12 text-center" | ||
> | ||
<h1 | ||
className="mt-5" | ||
> | ||
Register Form | ||
</h1> | ||
</div> | ||
</div> | ||
<div | ||
className="row" | ||
> | ||
<div | ||
className="col-lg-12" | ||
> | ||
<form | ||
className="register-form mx-auto" | ||
onSubmit={[Function]} | ||
> | ||
<form-group | ||
controlId="formName" | ||
> | ||
<p | ||
className="input-control" | ||
> | ||
<label | ||
htmlFor="name" | ||
> | ||
Name : | ||
</label> | ||
<input | ||
className="field" | ||
maxLength={30} | ||
minLength={2} | ||
name="name" | ||
onChange={[Function]} | ||
pattern="^[a-zA-Z\\\\s\\\\-]+$" | ||
placeholder="Full Name" | ||
required={true} | ||
type="text" | ||
/> | ||
</p> | ||
</form-group> | ||
<div> | ||
<br /> | ||
</div> | ||
<form-group | ||
controlId="formUserame" | ||
> | ||
<p | ||
className="input-control" | ||
> | ||
<label | ||
htmlFor="username" | ||
> | ||
Username : | ||
</label> | ||
<input | ||
className="field" | ||
maxLength={25} | ||
minLength={5} | ||
name="username" | ||
onChange={[Function]} | ||
pattern="^[a-zA-Z0-9/_]+$" | ||
placeholder="Username" | ||
required={true} | ||
type="text" | ||
/> | ||
</p> | ||
</form-group> | ||
<div> | ||
<br /> | ||
</div> | ||
<form-group | ||
controlId="formEmail" | ||
> | ||
<p | ||
className="input-control" | ||
> | ||
<label | ||
htmlFor="email" | ||
> | ||
Email : | ||
</label> | ||
<input | ||
className="field" | ||
name="email" | ||
onChange={[Function]} | ||
pattern="^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\\\.[a-zA-Z0-9-.]+$" | ||
placeholder="Email" | ||
required={true} | ||
type="email" | ||
/> | ||
</p> | ||
</form-group> | ||
<div> | ||
<br /> | ||
</div> | ||
<form-group | ||
controlId="formPassword" | ||
> | ||
<p | ||
className="input-control" | ||
> | ||
<label | ||
htmlFor="password" | ||
> | ||
Password : | ||
</label> | ||
<input | ||
className="field" | ||
maxLength={64} | ||
minLength={8} | ||
name="password" | ||
onChange={[Function]} | ||
placeholder="Password" | ||
required={true} | ||
type="password" | ||
/> | ||
</p> | ||
</form-group> | ||
<div> | ||
<br /> | ||
</div> | ||
<div> | ||
<br /> | ||
</div> | ||
<form-group> | ||
<div | ||
className="row" | ||
> | ||
<div | ||
className="col-sm text-center" | ||
> | ||
<label | ||
htmlFor="availability" | ||
> | ||
Available to be a : | ||
</label> | ||
<form-group> | ||
<div | ||
className="mb-3" | ||
> | ||
<div | ||
className="row" | ||
> | ||
<div | ||
className="col-sm" | ||
> | ||
<input | ||
id="inline-checkbox-1" | ||
name="available_to_mentor" | ||
onChange={[Function]} | ||
type="checkbox" | ||
value={true} | ||
/> | ||
<label | ||
htmlFor="mentor" | ||
> | ||
Mentor | ||
</label> | ||
</div> | ||
<div | ||
className="col-sm" | ||
> | ||
<input | ||
id="inline-checkbox-2" | ||
name="need_mentoring" | ||
onChange={[Function]} | ||
type="checkbox" | ||
value={true} | ||
/> | ||
<label | ||
htmlFor="mentee" | ||
> | ||
Mentee | ||
</label> | ||
</div> | ||
</div> | ||
</div> | ||
</form-group> | ||
</div> | ||
</div> | ||
</form-group> | ||
<form-group | ||
controlId="formTermsCheck" | ||
> | ||
<div | ||
className="row" | ||
> | ||
<div | ||
className="col-sm" | ||
> | ||
<p | ||
className="input-control" | ||
> | ||
<input | ||
name="terms_and_conditions_checked" | ||
onChange={[Function]} | ||
required={true} | ||
type="checkbox" | ||
value={true} | ||
/> | ||
</p> | ||
</div> | ||
<div | ||
className="col-sm-10" | ||
> | ||
<label> | ||
By checking this box, I affirm that I have read and accept to be bound by the AnitaB.org Code of Conduct, Terms, and Privacy Policy. Further I consent to the use of my information for the stated purpose. | ||
</label> | ||
</div> | ||
</div> | ||
</form-group> | ||
<div /> | ||
<div | ||
className="row" | ||
> | ||
<label> | ||
Already register? Login here. | ||
</label> | ||
</div> | ||
<div | ||
className="row button-group" | ||
> | ||
<div | ||
className="col-sm" | ||
> | ||
<div | ||
className="row" | ||
> | ||
<a | ||
className="btn btn-primary" | ||
href="/login" | ||
id="loginbtn" | ||
role="button" | ||
> | ||
Login | ||
</a> | ||
</div> | ||
</div> | ||
<div | ||
className="col-sm" | ||
/> | ||
<div | ||
className="col-sm" | ||
> | ||
<button | ||
className="btn btn-success" | ||
name="submit" | ||
type="submit" | ||
value="Signup" | ||
variant="success" | ||
> | ||
Sign Up | ||
</button> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
`; |