-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
write tests for components create footer component style footer component [delivers #167129867]
- Loading branch information
Showing
15 changed files
with
1,485 additions
and
1,220 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,2 @@ | ||
jest.config.js | ||
server.js |
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,30 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"jest": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings", | ||
"airbnb" | ||
], | ||
"parser": "babel-eslint", | ||
"parserOptions": { | ||
"allowImportExportEverywhere": true, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"esversion": 6, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["react"], | ||
"rules": { | ||
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], | ||
"react/require-default-props": 0, | ||
"function-paren-newline": ["error", "multiline"], | ||
"jsx-a11y/anchor-is-valid": 0, | ||
"object-curly-newline": ["error", { "consistent": true }] | ||
} | ||
} |
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,3 +1,4 @@ | ||
eslint: | ||
enabled: true | ||
config_file: .eslintrc | ||
ignore_file: .eslintignore |
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,2 @@ | ||
{ | ||
} |
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 @@ | ||
export default ''; |
Large diffs are not rendered by default.
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,26 @@ | ||
import React from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
import './footer.scss'; | ||
|
||
const Footer = () => ( | ||
<footer className="footer-container"> | ||
<nav> | ||
<ul className="footer-links"> | ||
<Link className="flink" to="/about"> | ||
About | ||
</Link> | ||
<span>|</span> | ||
<Link className="flink" to="how-it-work"> | ||
How it works | ||
</Link> | ||
<span>|</span> | ||
<Link className="flink" to="contacts"> | ||
Contact us | ||
</Link> | ||
</ul> | ||
<p className="rights">© CSLC 2019. All rights Reserved.</p> | ||
</nav> | ||
</footer> | ||
); | ||
|
||
export default Footer; |
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,34 @@ | ||
$base-white: #fff; | ||
$off-white: rgba(255, 255, 255, 0.90); | ||
$base-background: #5F3518; | ||
|
||
.footer-container { | ||
background: $base-background; | ||
color: $base-white; | ||
height: 100px; | ||
padding: 20px; | ||
position: relative; | ||
width: 100%; | ||
} | ||
|
||
.footer-links .flink { | ||
color: $base-white; | ||
padding: 5px 10px; | ||
} | ||
|
||
.footer-links .flink:hover { | ||
color: $off-white; | ||
text-decoration: none; | ||
} | ||
|
||
.footer-div { | ||
bottom: 0; | ||
left: 0; | ||
position: fixed; | ||
width: 100%; | ||
} | ||
|
||
.rights { | ||
position: relative; | ||
text-align: center; | ||
} |
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,19 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import Footer from '../../components/Footer/Footer'; | ||
|
||
describe('Footer component should be rendered', () => { | ||
const footerComponent = shallow(<Footer />); | ||
|
||
it('should contain a footer element', () => { | ||
expect(footerComponent.find('footer').exists()).toBe(true); | ||
}); | ||
it('should contain a footer-container div', () => { | ||
expect(footerComponent.find('footer.footer-container').exists()).toBe(true); | ||
}); | ||
|
||
it('should contain a p child element', () => { | ||
expect(footerComponent.find('footer > nav').exists()).toBe(true); | ||
expect(footerComponent.find('nav').length).toBe(1); | ||
}); | ||
}); |
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,10 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import Login from '../../views/login'; | ||
|
||
describe('test Login Page component', () => { | ||
it('should render Logincomponent correctly', (done) => { | ||
shallow(<Login />); | ||
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import NotFound from '../../views/NotFound'; | ||
|
||
describe('test Not Found Page component', () => { | ||
it('should render NotFound component correctly', (done) => { | ||
shallow(<NotFound />); | ||
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import Routes from '../../routes/routes'; | ||
|
||
describe('test Route component', () => { | ||
it('should render Route component correctly', (done) => { | ||
shallow(<Routes />); | ||
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