-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into camille-frontend
- Loading branch information
Showing
7 changed files
with
16,357 additions
and
8,013 deletions.
There are no files selected for viewing
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,3 @@ | ||
{ | ||
"presets": ["@babel/preset-env", "@babel/preset-react"] | ||
} |
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,12 @@ | ||
import '@testing-library/jest-dom'; | ||
import React from 'react'; | ||
import { render, screen, cleanup } from '@testing-library/react'; | ||
import LandingPage from '../client/containers/LandingPage'; | ||
// import LoginForm from '../client/components/LoginForm.jsx'; | ||
|
||
//landing page | ||
test('Landing page should render', () => { | ||
render(<LandingPage />); | ||
const LandingPageElement = screen.getByTestId('landing'); | ||
expect(LandingPageElement).toBeInTheDocument(); | ||
}); |
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,59 @@ | ||
const request = require("supertest"); | ||
const server = 'http://localhost:3000'; | ||
|
||
//testing post route to user/verify | ||
describe('Requests to /user/verify should work', () => { | ||
test('POST /user/verify', (done) => { | ||
request(server) | ||
.post("/user/verify") | ||
.send({ | ||
name: 'TESTNAME', | ||
email: 'TESTEMAIL', | ||
password: 'TESTPASSWORD', | ||
}) | ||
.expect(200) | ||
.end((err, res) => { | ||
if (err) return done(err); | ||
return done(); | ||
}) | ||
}); | ||
}); | ||
|
||
//test get request for user/:user_id | ||
describe('Requests to /user/:user_id should work', () => { | ||
test('GET /user/user_id', (done) => { | ||
request(server) | ||
.get("/user/1") | ||
.expect(200) | ||
.end((err, res) => { | ||
if (err) return done(err); | ||
return done(); | ||
}) | ||
}); | ||
}); | ||
|
||
//testing get route to record/:record_id | ||
describe('Requests to /record/:record_id should work', () => { | ||
test('GET /record/:record_id', (done) => { | ||
request(server) | ||
.post("/record/1") | ||
.expect(200) | ||
.end((err, res) => { | ||
if (err) return done(err); | ||
return done(); | ||
}) | ||
}); | ||
}); | ||
|
||
//testing get route to client/:client_id | ||
describe('Requests to /user/verify should work', () => { | ||
test('GET /client/:client_id', (done) => { | ||
request(server) | ||
.post("/client/1") | ||
.expect(200) | ||
.end((err, res) => { | ||
if (err) return done(err); | ||
return done(); | ||
}) | ||
}); | ||
}); |
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 |
---|---|---|
|
@@ -59,6 +59,7 @@ const LandingPage = ({ user, setUser }) => { | |
Signup | ||
</button> | ||
</div> | ||
|
||
{showModal()} | ||
</div> | ||
); | ||
|
Oops, something went wrong.