Skip to content

Commit

Permalink
Merge pull request #625 from nasa-gibs/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Benjaki2 authored Nov 30, 2017
2 parents 6f33c4e + e65f6b4 commit a85692d
Show file tree
Hide file tree
Showing 144 changed files with 18,556 additions and 6,412 deletions.
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# /node_modules/* and /bower_components/* ignored by default

build/*
dist/*
etc/*
lib/*
options/*
reports/*
web/ext/*
web/dist/*
72 changes: 62 additions & 10 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,71 @@

{
"env": {
"browser": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "script",
"ecmaFeatures": {
"jsx": false
}
"ecmaVersion": 6,
"sourceType": "script"
},
"extends": "standard",
"rules": {
"strict": 0,
"semi": [2, "always"],
"indent": [2, 2, {"SwitchCase": 1}],
}
"semi": ["error", "always"],
"space-before-function-paren": "off"
},
"overrides": [
{
"files": [ "web/**/*.js", "test/**/*.js" ],
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "script",
"ecmaFeatures": {
"jsx": false
}
},
"rules": {
"no-octal": "warn",
"no-unused-vars": "warn",
"no-undef": "warn",
"no-useless-escape": "warn",
"eqeqeq": "warn",
"padded-blocks": "warn",
"space-before-blocks": "warn",
"spaced-comment": "warn",
"no-multiple-empty-lines": "warn",
"operator-linebreak": "warn",
"comma-dangle": "warn",
"no-use-before-define": "warn",
"camelcase": "warn",
"no-extend-native": "warn",
"one-var": "warn",
"no-extra-parens": "warn",
"space-in-parens": "warn",
"space-infix-ops": "warn",
"no-multi-spaces": "warn",
"comma-spacing": "warn",
"yoda": "warn",
"no-useless-return": "warn",
"keyword-spacing": "warn",
"brace-style": "warn",
"func-call-spacing": "warn",
"no-return-assign": "warn",
"no-sequences": "warn",
"no-unused-expressions": "warn",
"no-useless-call": "warn",
"no-trailing-spaces": "warn",
"standard/computed-property-even-spacing": "warn",
"wrap-iife": "warn",
"new-cap": "warn"
},
"globals": {
"wv": true,
"wvx": true,
"WVC": true,
"buster": true,
"jQuery": true,
"$": true,
"_": true
}
}
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ npm-debug.log
reports
selenium-debug.log
*.jar
local.log
34 changes: 32 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,39 @@ If you want to submit your own contributions, follow these steps;

We ask that you follow these guidelines with your contributions;

### Tests
### Unit Tests

All of the automated tests for this project need to pass before your submission will be accepted. You can run `npm test` in the command line after making changes to verify that the tests pass. If you add new functionality, please consider adding tests for that functionality as well.
All of the unit tests for this project need to pass before your submission will be accepted. You can run `npm test` in the command line after making changes to verify that the tests pass. If you add new functionality, please consider adding tests for that functionality as well.

### End-to-end Tests

You can run the included end-to-end tests to test the app in Chrome and Firefox. The tests run the Cucumber features in the `./e2e/features` using Nightwatch and Selenium.

To run tests in Chrome;

1) Run `npm run e2e:chrome`

To run tests in Firefox;

1) [Create a new Firefox profile](https://developer.mozilla.org/en-US/Firefox/Multiple_profiles) called 'nightwatch'
2) Run `npm run e2e:firefox`

You can run tests for both browsers in sequence by running `npm run e2e`,

To run tests in Browserstack;

1) Log into your [Browserstack automation](https://www.browserstack.com/automate) and get your username and access key from the upper left
2) Set these environmental variables in your shell;
- `export BROWSERSTACK_ACCESS_KEY=yourkeyhere`
- `export BROWSERSTACK_USER=yourusernamehere`
3) Configure `./e2e/environments.json` with the browsers you want to test.
4) Run `npm run browserstack`

#### End-to-end Test Reports

After running end-to-end tests, reports are generated and saved in `./e2e/reports`. You can convert these to HTML by running `npm run report <environment>` where `<environment>` is either the lowercase name of the browser for local tests (`chrome` or `firefox`) or the name of the Browserstack environment, such as `Chrome_61-0_OS_X_El_Capitan-1` (you can get this name from the JSON files in `./e2e/reports`).

The end-to-end tests are a little bit flaky, so they aren't required to pass before a submission will be accepted, but you should run them and read through the results to make sure that you haven't broken any functionality. Please also consider adding end-to-end tests to cover any functionality you add.

### Commits

Expand Down
Loading

0 comments on commit a85692d

Please sign in to comment.