Skip to content

Commit 89b2b6e

Browse files
committed
add(build/release) integration test specs. Added a custom jasmine matcher jasmine-diff-matchers to package.json for the tests to have easier to error read logs.
1 parent 8bd23f9 commit 89b2b6e

File tree

16 files changed

+372
-1
lines changed

16 files changed

+372
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
"yargs": "latest"
100100
},
101101
"devDependencies": {
102-
"jasmine-node": "latest"
102+
"jasmine-node": "latest",
103+
"jasmine-diff-matchers": "^1.0.2"
103104
}
104105
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/.idea
2+
/bower_components/*
3+
/node_modules/*
4+
/app-build
5+
/app-release
6+
/app-test
7+
npm-debug.log
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"bitwise": true,
3+
"camelcase": true,
4+
"curly": true,
5+
"eqeqeq": true,
6+
"forin": false,
7+
"freeze": false,
8+
"immed": true,
9+
"indent": 2,
10+
"latedef": "nofunc",
11+
"newcap": true,
12+
"noarg": true,
13+
"noempty": true,
14+
"nonbsp": true,
15+
"nonew": true,
16+
"plusplus": false,
17+
"quotmark": "single",
18+
"undef": true,
19+
"unused": true,
20+
"strict": false,
21+
"maxparams": 20,
22+
"maxdepth": 5,
23+
"maxlen": 120,
24+
"esnext": true,
25+
"globals": {
26+
"angular": false,
27+
"module": false,
28+
"document": false,
29+
"require": false
30+
}
31+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "browser-image-diff-client",
3+
"version": "0.0.0",
4+
"port": 61658
5+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html ng-app="browser-image-diff-client">
3+
<head lang="en">
4+
<!-- bower:css -->
5+
<!-- endinject -->
6+
<!-- inject:css -->
7+
<!-- endinject -->
8+
</head>
9+
<body>
10+
<ui-view></ui-view>
11+
<!-- bower:js -->
12+
<!-- endinject -->
13+
<!-- inject:js -->
14+
<!-- endinject -->
15+
</body>
16+
</html>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* globals angular */
2+
3+
var appRoutes = require('../minimal/appRoutes');
4+
var appController = require('../minimal/appController');
5+
6+
angular.module('browser-image-diff-client', ['ui.router'])
7+
.controller('AppController', appController)
8+
.config(appRoutes);
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
$font-stack: Helvetica, sans-serif;
2+
$primary-color: #333;
3+
4+
body {
5+
font: 100% $font-stack;
6+
color: $primary-color;
7+
}
8+
9+
nav {
10+
ul {
11+
margin: 0;
12+
padding: 0;
13+
list-style: none;
14+
}
15+
16+
li {
17+
display: inline-block;
18+
}
19+
20+
a {
21+
display: block;
22+
padding: 6px 12px;
23+
text-decoration: none;
24+
}
25+
}
26+
27+
@mixin border-radius($radius) {
28+
-webkit-border-radius: $radius;
29+
-moz-border-radius: $radius;
30+
-ms-border-radius: $radius;
31+
border-radius: $radius;
32+
}
33+
34+
.box {
35+
@include border-radius(10px);
36+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "minimal-es5",
3+
"version": "0.0.1",
4+
"description": "Minimal test es5 project for Angularity.",
5+
"private": true,
6+
"tags": [],
7+
"dependencies": {
8+
"jquery": "~2.1.3",
9+
"angular": "~1.3.13",
10+
"angular-ui-router": "~0.2.13"
11+
},
12+
"devDependencies": {}
13+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/* globals basePath:true, files:true, exclude:true, reporters:true, port:true, colors:true, config:true */
2+
/* globals autoWatch:true, browsers:true, captureTimeout:true, singleRun:true, reportSlowerThan:true */
3+
/* globals LOG_DISABLE, LOG_ERROR, LOG_WARN, LOG_INFO, LOG_DEBUG */
4+
5+
// Karma configuration
6+
7+
module.exports = function(config) {
8+
config.set({
9+
// base path, that will be used to resolve files and exclude
10+
basePath: process.cwd(),
11+
12+
//make sure we use karma-jasmine as the test framework
13+
frameworks: ['jasmine'],
14+
15+
// list of files / patterns to load in the browser
16+
// angularity will package unit tests and append to the `files` array
17+
files: [].concat(/*ANGULARITY_FILE_LIST*/),
18+
19+
// list of files to exclude
20+
exclude: [],
21+
22+
// register any plugins which are not siblings of karma in angularity global
23+
// installation and thus need to be registered manually
24+
// append to existing value to preserve plugins loaded automatically
25+
plugins: [].concat(config.plugins),
26+
27+
// use dots reporter, as travis terminal does not support escaping sequences
28+
// possible values: 'dots', 'progress', 'junit', 'teamcity'
29+
reporters: [].concat(/*ANGULARITY_REPORTER_LIST*/),
30+
31+
// web server port
32+
port: 61658,
33+
34+
// enable / disable colors in the output (reporters and logs)
35+
colors: true,
36+
37+
// level of logging
38+
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
39+
logLevel: config.LOG_INFO,
40+
41+
// enable / disable watching file and executing tests whenever any file changes
42+
autoWatch: false,
43+
44+
// Start these browsers, currently available:
45+
// - Chrome
46+
// - ChromeCanary
47+
// - Firefox
48+
// - Opera
49+
// - Safari (only Mac)
50+
// - PhantomJS
51+
// - IE (only Windows)
52+
browsers: ['Chrome'],
53+
54+
// If browser does not capture in given timeout [ms], kill it
55+
captureTimeout: 5000,
56+
57+
// Auto run tests on start (when browsers are captured) and exit
58+
singleRun: true,
59+
60+
// report which specs are slower than 500ms
61+
reportSlowerThan: 500
62+
});
63+
};
64+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* <p>Hello World Controller</p>
3+
*/
4+
module.exports = function AppController($scope) {
5+
$scope.title = 'Hello World';
6+
};

0 commit comments

Comments
 (0)