Skip to content

Commit e0ff914

Browse files
Merge pull request #197 from urbanriskmap/dev
User agreement updates, permanent link for T&Cs
2 parents e090068 + 7316623 commit e0ff914

37 files changed

+746
-263
lines changed

.babelrc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@
44
"comments": false,
55
"compact": false,
66
"code": true,
7-
"presets": [ "es2015-loose", "stage-1"],
7+
"presets": [ ["es2015", {"loose": true}], "stage-1"],
88
"plugins": [
99
"syntax-flow",
1010
"transform-decorators-legacy",
1111
"transform-flow-strip-types"
12-
]
12+
],
13+
"env": {
14+
"test": {
15+
"plugins": [
16+
["istanbul"]
17+
],
18+
}
19+
}
1320
}

.travis.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ node_js:
33
- "6.10.0"
44
sudo: false
55

6+
addons:
7+
chrome: stable
8+
69
branches:
710
only:
811
- master
@@ -16,12 +19,6 @@ notifications:
1619
on_failure: always # options: [always|never|change] default: always
1720
on_start: always # options: [always|never|change] default: always
1821

19-
addons:
20-
browserstack:
21-
username: abrahamquintero1
22-
access_key:
23-
secure: "tf4N4MjqK/0yyI+FOTuCq+douo1m9UEW8VRn8/n8tYr/RGDkOkmGfaalrdrayv9v/LO6FmHb3vWwYKD3cfZEqe574Mcywk03mCGt+Pghq2tMFW8jpTUO7DB9KhFteCmHz39vEnL5/vY4FVVwyEEUQ7t5ycU6L/DP2kCmy7JdqC/XdvvDQu4UB39pAbDabY3/FsNexXKjQ2JZRuL7kHxBAX8qOkidoppZezxvK1DGNWiVGSXZ2Grnu8RSPcEo9OIo+TMLcT9l4p2nO1JC6+iNn73u5ZuNLFB2brf0wbP1nIL2h2ptwnWmADAWGlXUB0/vZU1iawN2M0aaR1s7kbCSs/DIcgWvnZ3Uz+mCufc0JyytKydGH8AdGr2eCU/HBUhju8tjimeXN/KsAwUeHufLqfEQo5jdrOToGx/Jm8GjSFMxE7OpwLl7Qdv93EK8hlGMXuKI+ofTjtRsBP4Bco1vEMiuvPiaY8sLIE6b+6gC8UiNdJpzf4Ul/+vgrvQGsysg7/B/EjTBXtHNDjv9AVKWujnlk/fjknwpSW+QclABan6NvlPzdZSbjDnHnHiSiEsMcrw2YO9OKd/izomuCS9R5LxeIk8noXhoQ/UGMNffVnhI40hYbYmzNsHtpKkVKdv3mhZzSpdq0YpLwHVepctKZH5kBq5paeoGBcNYdkW99iA="
24-
2522
before_install:
2623
- if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
2724

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ ___
5555
* '/map/:city/:report' *query parameter (city & report): flyTo queried report id in a supported city*
5656
* '/cards/:id' *query parameter (one time card id): link to access report cards, (use test123 as card id in dev & local environments*
5757

58+
* *Additional query parameters*
59+
* ?lang : Use for setting language to one of the supported languages (en || id).
60+
* ?tab : Use for opening the side pane set to one of the following tabs (report || map || info)
61+
* eg. https://dev.petabencana.id/map?lang=en&tab=info
62+
5863
___
5964

6065
### Configuration
@@ -99,10 +104,12 @@ Do ('npm test') to build the project and run the tests.
99104

100105
If you want to run BrowserStack, you need to provide environment variables with your
101106
username and password. Put `export BROWSERSTACK_USERNAME=yourUsername` and `export BROWSERSTACK_KEY=yourAccessKey` into
102-
your ~/.bashrc or ~/.bash_profile in order for karma to pick up the browserstack credentials.
107+
your ~/.bashrc or ~/.bash_profile in order for karma to pick up the browserstack credentials. Now run `source ~/bash_profile` and
108+
npm test in order to build the bundle and run karama unit tests against it.
109+
110+
##e2e testing:
103111

104-
You also need the browserstack local [testing binary](https://www.browserstack.com/local-testing). Install it with your key:
105-
`./BrowserStackLocal --key yourAccessKey`
112+
End to end testing is implemented using protractor, webdriver, and browserstack. First install protractor: `npm install -g protractor` then download the webdriver binaries: `webdriver-manager update`. In order to run the tests, the front end must be being served. Run au run in a separate terminal, and then run `protractor protractor.conf.js` which will start the tests. Protractor can be a little finicky, so you should let it run without interacting with other browser windows.
106113

107114
Mockapi to be used in the future.
108115

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
export default {
2-
debug: true,
3-
testing: true,
4-
tile_layer: 'https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.{ext}',
2+
debug: false,
3+
testing: false,
4+
tile_layer: 'https://api.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoidXJiYW5yaXNrbWFwIiwiYSI6ImNpdmVhbTFraDAwNHIyeWw1ZDB6Y2hhbTYifQ.tpgt1PB5lkJ-wITS02c96Q',
55
data_server: 'https://data-dev.petabencana.id/',
66
app: 'https://dev.petabencana.id/',
77
default_language: 'en',
88
supported_languages: ['en', 'id'],
9-
enable_test_cardid: true
9+
enable_test_cardid: true
1010
};

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<!-- Open Graph data -->
1515
<meta property="og:title" content="PetaBencana.id" />
1616
<meta property="og:url" content="http://www.petabencana.id/" />
17-
<meta property="og:site_name" content="Petabencana.id" />
17+
<meta property="og:site_name" content="PetaBencana.id" />
1818
<meta property="og:image" content="https://dev.petabencana.id/assets/images/cards_image.png" />
1919
<meta property="og:description" content="PetaBencana harnesses the power of social media to gather, sort, and display information about flooding in real time." />
2020

karma.conf.js

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = function(config) {
2323
[project.unitTestRunner.source]: [project.transpiler.id]
2424
},
2525
'babelPreprocessor': { options: project.transpiler.options },
26-
reporters: ['progress'],
26+
reporters: ['progress', 'coverage', 'BrowserStack'],
2727
port: 9876,
2828
colors: true,
2929
logLevel: config.LOG_INFO,
@@ -36,33 +36,12 @@ module.exports = function(config) {
3636
args: ['aurelia-root', project.paths.root]
3737
},
3838

39-
// global config of your BrowserStack account
40-
browserStack: {
41-
username: process.env.BROWSERSTACK_USERNAME,
42-
accessKey: process.env.BROWSERSTACK_KEY
43-
},
44-
45-
// define browsers
46-
customLaunchers: {
47-
bs_firefox_mac: {
48-
base: 'BrowserStack',
49-
browser: 'firefox',
50-
browser_version: '21.0',
51-
os: 'OS X',
52-
os_version: 'Mountain Lion'
53-
},
54-
bs_iphone5: {
55-
base: 'BrowserStack',
56-
device: 'iPhone 5',
57-
os: 'ios',
58-
os_version: '6.0'
59-
}
60-
},
61-
62-
browsers: ['bs_firefox_mac', 'bs_iphone5'],
39+
//optionally, configure the reporter
40+
coverageReporter: {
41+
type : 'html',
42+
dir : 'coverage/'
43+
},
6344

45+
browsers: ['Chrome']
6446
});
65-
if (!process.env.TRAVIS) {
66-
config.browsers.push('Chrome');
67-
}
6847
};

package.json

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,62 +14,62 @@
1414
},
1515
"license": "GPL-3.0",
1616
"dependencies": {
17-
"aurelia-animator-css": "^1.0.0",
18-
"aurelia-bootstrapper": "^1.0.0",
19-
"aurelia-fetch-client": "^1.0.1",
20-
"aurelia-http-client": "^1.0.3",
21-
"bluebird": "^3.4.1",
22-
"chart.js": "^2.4.0",
23-
"jquery": "^3.1.1",
24-
"leaflet": "^1.0.1",
25-
"less": "^2.7.1",
17+
"aurelia-animator-css": "^1.0.2",
18+
"aurelia-bootstrapper": "^2.1.1",
19+
"aurelia-fetch-client": "^1.1.2",
20+
"aurelia-http-client": "^1.1.1",
21+
"aurelia-protractor-plugin": "^1.0.3",
22+
"bluebird": "^3.5.0",
23+
"chart.js": "^2.5.0",
24+
"jquery": "^3.2.1",
25+
"leaflet": "^1.0.3",
26+
"less": "^2.7.2",
2627
"nprogress": "^0.2.0",
27-
"requirejs": "^2.3.2",
28+
"requirejs": "^2.3.3",
2829
"text": "github:requirejs/text#latest",
29-
"whatwg-fetch": "^1.0.0"
30+
"whatwg-fetch": "^2.0.3"
3031
},
3132
"peerDependencies": {},
3233
"devDependencies": {
33-
"aurelia-cli": "^0.22.0",
34-
"aurelia-testing": "^1.0.0-beta.2.0.0",
35-
"aurelia-tools": "^0.2.2",
36-
"babel-eslint": "^6.0.4",
37-
"babel-plugin-syntax-flow": "^6.8.0",
34+
"aurelia-cli": "^0.29.0",
35+
"aurelia-testing": "^1.0.0-beta.3.0.1",
36+
"aurelia-tools": "^1.0.0",
37+
"babel-eslint": "^7.2.3",
38+
"babel-plugin-syntax-flow": "^6.18.0",
3839
"babel-plugin-transform-decorators-legacy": "^1.3.4",
39-
"babel-plugin-transform-es2015-modules-amd": "^6.8.0",
40-
"babel-plugin-transform-es2015-modules-commonjs": "^6.10.3",
41-
"babel-plugin-transform-flow-strip-types": "^6.8.0",
42-
"babel-polyfill": "^6.9.1",
43-
"babel-preset-es2015": "^6.9.0",
44-
"babel-preset-es2015-loose": "^7.0.0",
45-
"babel-preset-stage-1": "^6.5.0",
46-
"babel-register": "^6.9.0",
47-
"browser-sync": "^2.13.0",
48-
"canned": "^0.3.9",
49-
"connect-history-api-fallback": "^1.2.0",
40+
"babel-plugin-transform-es2015-modules-amd": "^6.24.1",
41+
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
42+
"babel-plugin-transform-flow-strip-types": "^6.22.0",
43+
"babel-polyfill": "^6.23.0",
44+
"babel-preset-es2015": "^6.24.1",
45+
"babel-preset-stage-1": "^6.24.1",
46+
"babel-register": "^6.24.1",
47+
"browser-sync": "^2.18.8",
48+
"canned": "^0.3.10",
49+
"connect-history-api-fallback": "^1.3.0",
5050
"gulp": "github:gulpjs/gulp#4.0",
5151
"gulp-babel": "^6.1.2",
52-
"gulp-changed-in-place": "^2.0.3",
53-
"gulp-cli": "^1.2.2",
54-
"gulp-eslint": "^2.0.0",
52+
"gulp-changed-in-place": "^2.2.0",
53+
"gulp-cli": "^1.3.0",
54+
"gulp-eslint": "^3.0.1",
5555
"gulp-flatten": "^0.3.1",
5656
"gulp-less": "^3.3.0",
57-
"gulp-notify": "^2.2.0",
57+
"gulp-notify": "^3.0.0",
5858
"gulp-plumber": "^1.1.0",
5959
"gulp-rename": "^1.2.2",
60-
"gulp-sourcemaps": "^2.0.0-alpha",
61-
"jasmine-core": "^2.4.1",
62-
"karma": "^0.13.22",
60+
"gulp-sourcemaps": "^2.6.0",
61+
"jasmine-core": "^2.6.1",
62+
"karma": "^1.7.0",
6363
"karma-babel-preprocessor": "^6.0.1",
6464
"karma-browserstack-launcher": "^1.2.0",
65-
"karma-chrome-launcher": "^1.0.1",
65+
"karma-chrome-launcher": "^2.1.1",
6666
"karma-coverage": "^1.1.1",
67-
"karma-jasmine": "^1.0.2",
68-
"minimatch": "^3.0.2",
67+
"karma-jasmine": "^1.1.0",
68+
"minimatch": "^3.0.4",
6969
"notifyjs-browser": "^0.4.2",
70-
"through2": "^2.0.1",
71-
"topojson-client": "^2.1.0",
70+
"through2": "^2.0.3",
71+
"topojson-client": "^3.0.0",
7272
"uglify-js": "~2.7.5",
73-
"vinyl-fs": "^2.4.3"
73+
"vinyl-fs": "^2.4.4"
7474
}
7575
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// An example configuration file.
2+
exports.config = {
3+
//directConnect: true,
4+
5+
'seleniumAddress': 'http://hub-cloud.browserstack.com/wd/hub',
6+
7+
'capabilities': {
8+
'browserstack.user': process.env.BROWSERSTACK_USERNAME,
9+
'browserstack.key': process.env.BROWSERSTACK_KEY,
10+
'browserName': 'android',
11+
'platform': 'ANDROID',
12+
'device': 'Samsung Galaxy S5',
13+
'browserstack.local': 'true',
14+
},
15+
16+
// Capabilities to be passed to the webdriver instance.
17+
//capabilities: {
18+
// 'browserName': 'chrome'
19+
//},
20+
21+
// optional: add seleniumServerJar with proper version number
22+
// seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.53.1.jar',
23+
specs: ['test/e2e/**/*.js'],
24+
25+
plugins: [{
26+
path: './node_modules/aurelia-protractor-plugin'
27+
//package: 'aurelia-protractor-plugin'
28+
}],
29+
30+
31+
// Options to be passed to Jasmine-node.
32+
jasmineNodeOpts: {
33+
showColors: true,
34+
defaultTimeoutInterval: 30000
35+
}
36+
};
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// An example configuration file.
2+
exports.config = {
3+
//directConnect: true,
4+
5+
'seleniumAddress': 'http://hub-cloud.browserstack.com/wd/hub',
6+
7+
'capabilities': {
8+
'browserstack.user': process.env.BROWSERSTACK_USERNAME,
9+
'browserstack.key': process.env.BROWSERSTACK_KEY,
10+
'browserName': 'iPhone',
11+
'platform': 'MAC',
12+
'device': 'iPhone 6S',
13+
'browserstack.debug': 'true',
14+
'browserstack.local': 'true',
15+
},
16+
17+
// Capabilities to be passed to the webdriver instance.
18+
//capabilities: {
19+
// 'browserName': 'chrome'
20+
//},
21+
22+
// optional: add seleniumServerJar with proper version number
23+
// seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.53.1.jar',
24+
specs: ['test/e2e/**/*.js'],
25+
26+
plugins: [{
27+
path: './node_modules/aurelia-protractor-plugin'
28+
//package: 'aurelia-protractor-plugin'
29+
}],
30+
31+
32+
// Options to be passed to Jasmine-node.
33+
jasmineNodeOpts: {
34+
showColors: true,
35+
defaultTimeoutInterval: 30000
36+
}
37+
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// An example configuration file.
2+
exports.config = {
3+
//directConnect: true,
4+
5+
'seleniumAddress': 'http://hub-cloud.browserstack.com/wd/hub',
6+
7+
'capabilities': {
8+
'browserstack.user': process.env.BROWSERSTACK_USERNAME,
9+
'browserstack.key': process.env.BROWSERSTACK_KEY,
10+
'os': 'OS X',
11+
'os_version': 'Yosemite',
12+
'browserName': 'Safari',
13+
'browser_version': '8.0',
14+
'resolution': '1024x768',
15+
'browserstack.debug': 'true',
16+
'browserstack.local': 'true',
17+
},
18+
19+
// Capabilities to be passed to the webdriver instance.
20+
//capabilities: {
21+
// 'browserName': 'chrome'
22+
//},
23+
24+
// optional: add seleniumServerJar with proper version number
25+
// seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.53.1.jar',
26+
specs: ['test/e2e/**/*.js'],
27+
28+
plugins: [{
29+
path: './node_modules/aurelia-protractor-plugin'
30+
//package: 'aurelia-protractor-plugin'
31+
}],
32+
33+
34+
// Options to be passed to Jasmine-node.
35+
jasmineNodeOpts: {
36+
showColors: true,
37+
defaultTimeoutInterval: 30000
38+
}
39+
};

0 commit comments

Comments
 (0)