Skip to content

Commit

Permalink
Upgrade angular, added Mocha, added password hashing/encoding (#18)
Browse files Browse the repository at this point in the history
* Upgraded Angular to 4.0.0-rc1 and CLI to 1.0.0-rc1

* Karma configuration is now a Typescript file

* Switched from Jasmine to Mocha in client-side tests

* Updated server-side tests with Chai

* Removed ng2-translate since I'm not using it at this point

* Passwords are now hashed and encoded before being sent to the server, this is done to ensure passwords are always within the ~50-bytes lower limit of bcrypt. In addition it is now very difficult for network sniffers to determine what the user typed in the password field.

* Temporarily disable Saucelabs testing until angular/angular#14730 is fixed
  • Loading branch information
Ionaru committed Mar 3, 2017
1 parent 5c5d361 commit f574662
Show file tree
Hide file tree
Showing 41 changed files with 978 additions and 934 deletions.
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
os:
- linux
sudo: required
dist: trusty
language: node_js
node_js:
- '7'
Expand All @@ -11,11 +13,14 @@ cache: yarn
env:
- SUB_DIR=client
- SUB_DIR=server
before_script:
- if [[ "$SUB_DIR" == "client" ]]; then export CHROME_BIN=chromium-browser; fi
before_install:
- if [[ "$SUB_DIR" == "client" ]]; then export CHROME_BIN=/usr/bin/google-chrome; fi
- if [[ "$SUB_DIR" == "client" ]]; then export DISPLAY=:99.0; fi
- if [[ "$SUB_DIR" == "client" ]]; then sh -e /etc/init.d/xvfb start; fi
before_install:
- if [[ "$SUB_DIR" == "client" ]]; then sudo apt-get update; fi
- if [[ "$SUB_DIR" == "client" ]]; then sudo apt-get install -y libappindicator1 fonts-liberation; fi
- if [[ "$SUB_DIR" == "client" ]]; then wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb; fi
- if [[ "$SUB_DIR" == "client" ]]; then sudo dpkg -i google-chrome*.deb; fi
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- openssl aes-256-cbc -K $encrypted_170d92a4e5a8_key -iv $encrypted_170d92a4e5a8_iv
Expand Down
4 changes: 2 additions & 2 deletions client/.angular-cli.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"version": "1.0.0-beta.30",
"name": "client"
},
"apps": [
Expand Down Expand Up @@ -46,7 +46,7 @@
],
"test": {
"karma": {
"config": "./karma.conf.js"
"config": "./karma.conf.ts"
}
},
"defaults": {
Expand Down
4 changes: 3 additions & 1 deletion client/e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { expect } from 'chai';

import { EveTrackPage } from './app.po';

describe('client App', function() {
Expand All @@ -9,6 +11,6 @@ describe('client App', function() {

it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('app works!');
expect(page.getParagraphText()).to.equal('app works!');
});
});
16 changes: 6 additions & 10 deletions client/e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
{
"compileOnSave": false,
"extends": "../src/tsconfig.json",
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": "../dist/out-tsc-e2e",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
"module": "commonjs",
"target": "es6",
"types":[
"mocha",
"node"
]
}
}
162 changes: 0 additions & 162 deletions client/karma.conf.js

This file was deleted.

Loading

0 comments on commit f574662

Please sign in to comment.