-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Finish #169995342]
- Loading branch information
Showing
43 changed files
with
355 additions
and
345 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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,28 @@ | ||
import React from "react"; | ||
import { shallow } from "enzyme" | ||
import { LandingPage } from "../../../components/landing-page/LandingPage"; | ||
|
||
let landingPage; | ||
const props = { | ||
isAuthenticated: false | ||
} | ||
|
||
describe('Landing page when user is not authenticated', () => { | ||
landingPage = shallow(<LandingPage {...props}/>); | ||
test('should load the landing page', () => { | ||
expect(landingPage.find("Connect(LoginForm)").exists()).toBe(true); | ||
}) | ||
|
||
}) | ||
|
||
describe('Landing page when user is authenticated', () => { | ||
beforeEach(() => { | ||
props.isAuthenticated = true; | ||
}); | ||
|
||
landingPage = shallow(<LandingPage {...props}/>); | ||
test('should load the landing page', () => { | ||
// console.log('landingPage.debug()', landingPage.debug()) | ||
}) | ||
|
||
}) |
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,11 @@ | ||
import React from "react" | ||
import { shallow } from "enzyme"; | ||
import {MapContainer} from "../../../../components/shared/map/MapContainer" | ||
|
||
describe('Map container', () => { | ||
let map = shallow(<MapContainer />) | ||
test('should map should render', () => { | ||
expect(map.find("InfoWindow").exists()).toBe(true) | ||
}) | ||
|
||
}) |
Binary file not shown.
Binary file not shown.
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,45 @@ | ||
import React from "react"; | ||
import "./LandingPage.scss"; | ||
import NavBar from "../navbar/navbar"; | ||
import React, { Component } from 'react'; | ||
import { connect } from "react-redux"; | ||
import LoginForm from '../login-page/LoginForm'; | ||
|
||
const LandingPage = () => ( | ||
<div className="container"> | ||
<NavBar /> | ||
<div className="cover"> | ||
<div className="welcome"> | ||
<h5> Welcome to </h5> | ||
<h1> Barefoot Nomad</h1> | ||
<h4>Making company travel and accommodation easy and convinient.</h4> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
export class LandingPage extends Component { | ||
componentDidMount () { | ||
if(this.props.isAuthenticated) { | ||
this.props.history.push("/dashboard"); | ||
} | ||
} | ||
render() { | ||
return ( | ||
<header className="header"> | ||
<div className="bg-video"> | ||
<video className="bg-video__content" autoPlay muted loop> | ||
<source src="video/video.mp4" type="video/mp4" /> | ||
<source src="video/video.webm" type="video/webm" /> | ||
Your browser is not supported! | ||
</video> | ||
</div> | ||
<div className="row"> | ||
<div className="col-2-of-3--landingpage header--left-side"> | ||
<div className="header__text-box"> | ||
<h1 className="heading"> | ||
<span className="heading--main">barefoot</span> | ||
<span className="heading--sub"> | ||
easy & convinient company travel | ||
</span> | ||
</h1> | ||
</div> | ||
</div> | ||
<div className="col-1-of-3--landingpage header--right-side"> | ||
<LoginForm /> | ||
</div> | ||
</div> | ||
</header> | ||
); | ||
} | ||
} | ||
|
||
export default LandingPage; | ||
const mapStateToProps = ({ loginState }) => ({ | ||
isAuthenticated: loginState.isAuthenticated | ||
}); | ||
|
||
export default connect(mapStateToProps)(LandingPage); |
This file was deleted.
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
Oops, something went wrong.