-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add end-to-end tests with Cypress (#247)
- Loading branch information
Showing
28 changed files
with
3,048 additions
and
85 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
client/node_modules/* | ||
client/build/* | ||
cypress/support/* | ||
cypress/integration/example_spec.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 |
---|---|---|
|
@@ -5,3 +5,5 @@ coverage | |
tmp | ||
log | ||
.vscode | ||
cypress/videos | ||
cypress/screenshots |
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,7 +1,17 @@ | ||
language: node_js | ||
node_js: | ||
- 8.3.0 | ||
|
||
cache: | ||
directories: | ||
- node_modules | ||
|
||
before_install: | ||
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2 | ||
- export PATH="$HOME/.yarn/bin:$PATH" | ||
script: "yarn lint" | ||
|
||
before_script: | ||
- NODE_ENV=test yarn run client-build | ||
- NODE_ENV=test yarn ci:start-app-for-test & | ||
|
||
script: "yarn lint && yarn run ci:test" |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./prod'); | ||
} else if (process.env.NODE_ENV === 'test') { | ||
module.exports = require('./test'); | ||
} else { | ||
module.exports = require('./dev'); | ||
} |
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,7 @@ | ||
module.exports = { | ||
googleClientID: 'fakekey', | ||
googleClientSecret: 'fakekey', | ||
mongoURI: 'fakekey', | ||
cookieKey: 'fakekey', | ||
redirectDomain: 'fakekey' | ||
}; |
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 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,39 +1,34 @@ | ||
/* eslint-disable react/prop-types */ /* - TODO: Fix and remove this line */ | ||
import React, { Component } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
// import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import { Link } from 'react-router'; | ||
import cx from 'classnames'; | ||
import { createCampaign } from '../redux/actions/initialSearch'; | ||
|
||
class NewCampaign extends Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
function NewCampaign(props) { | ||
const { childRoutes } = props.route; | ||
const { pathname } = props.location; | ||
|
||
render() { | ||
const { childRoutes } = this.props.route; | ||
const { pathname } = this.props.location; | ||
|
||
return ( | ||
<div className="create_campaign_wrapper"> | ||
<h1 className="create_campaign_header">{"Let's create a campaign!"}</h1> | ||
<div className="create_campaign_breadcrumbs"> | ||
{childRoutes.map(childRoute => ( | ||
<Link to={`/new-campaign/${childRoute.path}`}> | ||
<div | ||
className={cx( | ||
'breadcrumb', | ||
pathname === `/new-campaign/${childRoute.path}` && 'active_route' | ||
)} | ||
/> | ||
</Link> | ||
))} | ||
</div> | ||
<section className="create_campaign_subroute_wrapper">{this.props.children}</section> | ||
return ( | ||
<div className="create_campaign_wrapper"> | ||
<h1 className="create_campaign_header">{'Let\'s create a campaign!'}</h1> | ||
<div className="create_campaign_breadcrumbs"> | ||
{childRoutes.map(childRoute => ( | ||
<Link to={`/new-campaign/${childRoute.path}`}> | ||
<div | ||
className={cx( | ||
'breadcrumb', | ||
pathname === `/new-campaign/${childRoute.path}` && 'active_route' | ||
)} | ||
/> | ||
</Link> | ||
))} | ||
</div> | ||
); | ||
} | ||
<section className="create_campaign_subroute_wrapper"> | ||
{props.children} | ||
</section> | ||
</div> | ||
); | ||
} | ||
|
||
export default connect(({ initialSearch }) => ({ initialSearch }))(NewCampaign); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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,11 @@ | ||
{ | ||
"env": { | ||
"mocha": true | ||
}, | ||
"globals": { | ||
"Cypress": true, | ||
"localStorage": true, | ||
"cy": true, | ||
"expect": true | ||
} | ||
} |
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,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "[email protected]", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
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,5 @@ | ||
{ | ||
"id": 8739, | ||
"name": "Jane", | ||
"email": "[email protected]" | ||
} |
Oops, something went wrong.