Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit b1b55b0

Browse files
committed
Merge pull request #10 from zain-elabedeen/master
Created test case environment(Karma) & directory structure and added
2 parents 1fab57c + dfe8634 commit b1b55b0

File tree

4 files changed

+146
-0
lines changed

4 files changed

+146
-0
lines changed

bower.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "webviewPlugin",
3+
"version": "0.0.0",
4+
"license": "MIT",
5+
"ignore": [
6+
"**/.*",
7+
"node_modules",
8+
"bower_components",
9+
"test",
10+
"tests"
11+
],
12+
"dependencies": {
13+
"jquery": "~2.1.4",
14+
"angular": "~1.4.3",
15+
"angular-mocks": "~1.4.3",
16+
"angular-animate": "~1.4.3",
17+
"angular-route": "~1.4.3",
18+
"angular-bootstrap": "~0.13.3"
19+
}
20+
}

karma.conf.js

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// Karma configuration
2+
// Generated on Fri Oct 09 2015 09:12:13 GMT-0700 (Pacific Daylight Time)
3+
4+
module.exports = function(config) {
5+
config.set({
6+
7+
// base path that will be used to resolve all patterns (eg. files, exclude)
8+
basePath: '',
9+
10+
11+
// frameworks to use
12+
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
13+
frameworks: ['jasmine'],
14+
15+
16+
// list of files / patterns to load in the browser
17+
files: [
18+
'test/assets/bower_components/jquery/dist/jquery.min.js',
19+
'test/assets/bower_components/angular/angular.js',
20+
'test/assets/bower_components/angular-animate/angular-animate.min.js',
21+
'test/assets/bower_components/angular-route/angular-route.min.js',
22+
'test/assets/bower_components/angular-bootstrap/ui-bootstrap.min.js',
23+
'test/assets/bower_components/angular-mocks/angular-mocks.js',
24+
'control/content/**/*.js',
25+
'widget/**/*.js',
26+
'test/assets/*.js',
27+
'test/**/*.spec.js'
28+
],
29+
30+
31+
// list of files to exclude
32+
exclude: [
33+
],
34+
35+
36+
// preprocess matching files before serving them to the browser
37+
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
38+
preprocessors: {
39+
},
40+
41+
42+
// test results reporter to use
43+
// possible values: 'dots', 'progress'
44+
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
45+
reporters: ['progress', 'coverage'],
46+
47+
coverageReporter: {
48+
type: 'html',
49+
dir: 'test/coverage/'
50+
},
51+
52+
53+
// web server port
54+
port: 9876,
55+
56+
57+
// enable / disable colors in the output (reporters and logs)
58+
colors: true,
59+
60+
61+
// level of logging
62+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
63+
logLevel: config.LOG_INFO,
64+
65+
66+
// enable / disable watching file and executing tests whenever any file changes
67+
autoWatch: true,
68+
69+
70+
// start these browsers
71+
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
72+
browsers: [ 'PhantomJS'],
73+
74+
// Continuous Integration mode
75+
// if true, Karma captures browsers, runs the tests and exits
76+
singleRun: true
77+
})
78+
};

package.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "webviewPlugin",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"postinstall": "./node_modules/.bin/bower install",
8+
"test": "./node_modules/.bin/karma start karma.conf.js"
9+
},
10+
"dependencies": {
11+
"bower": "^1.5.3",
12+
"karma-cli": "^0.1.0"
13+
},
14+
"repository": {
15+
"type": "git",
16+
"url": "https:/github.com/BuildFire/opentablePlugin.git"
17+
},
18+
"author": "Daniel Hindi",
19+
"license": "ISC",
20+
"devDependencies": {
21+
"chai": "^3.3.0",
22+
"jasmine-core": "^2.3.4",
23+
"karma": "^0.13.10",
24+
"karma-chai": "^0.1.0",
25+
"karma-jasmine": "^0.3.6",
26+
"karma-coverage": "^0.5.1",
27+
"karma-chrome-launcher": "^0.2.1",
28+
"karma-firefox-launcher": "^0.1.6",
29+
"karma-ie-launcher": "^0.2.0",
30+
"karma-mocha": "^0.2.0",
31+
"karma-safari-launcher": "^0.1.1",
32+
"karma-phantomjs-launcher": "^0.2.1",
33+
"mocha": "^2.3.3",
34+
"phantomjs": "^1.9.17"
35+
}
36+
}

test/control/content/app.spec.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* Created by zain on 05/01/16.
3+
*/
4+
5+
describe('webviewPlugin Content: app', function () {
6+
7+
describe('Buildfire service', function () {
8+
it('Buildfire should exists', function () {
9+
expect(true).toBeDefined();
10+
});
11+
});
12+
});

0 commit comments

Comments
 (0)