Skip to content

Commit 790ba1b

Browse files
committed
Merging master
2 parents e6331f5 + 0dcb674 commit 790ba1b

File tree

19 files changed

+270
-193
lines changed

19 files changed

+270
-193
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules
22
bower_components
33
dist
44
test_out
5-
coverage
5+
coverage
6+
instrument

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ before_install:
1313
script:
1414
- npm run start
1515
- sleep 3
16+
- npm run instrument
1617
- npm run test-single
17-
- npm run protractor
18+
- npm run protractor
19+
- npm run cover-combined
20+
- cat ./coverage/final/lcov.info | coveralls

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#Ignite UI directives for AngularJS
22

3-
[![Build Status](https://travis-ci.org/IgniteUI/igniteui-angular.svg?branch=master)](https://travis-ci.org/IgniteUI/igniteui-angular) [![Codacy Badge](https://api.codacy.com/project/badge/grade/f7b38e525b504be0aabc891079530521)](https://www.codacy.com/app/kdinev/igniteui-angular)
3+
[![Build Status](https://travis-ci.org/IgniteUI/igniteui-angular.svg?branch=master)](https://travis-ci.org/IgniteUI/igniteui-angular)
4+
[![Coverage Status](https://coveralls.io/repos/github/IgniteUI/igniteui-angular/badge.svg?branch=master)](https://coveralls.io/github/IgniteUI/igniteui-angular?branch=master)
5+
[![Codacy Badge](https://api.codacy.com/project/badge/grade/f7b38e525b504be0aabc891079530521)](https://www.codacy.com/app/kdinev/igniteui-angular)
46

57
Use the directives found in `igniteui-angular.js` to use [Ignite UI](http://igniteui.com) controls in [AngularJS](http://angularjs.com) pages. [Work with the running samples here](http://igniteui.github.io/igniteui-angular).
68

@@ -150,7 +152,11 @@ Simply do:
150152

151153
npm install
152154

153-
The command is preconfigured and it will also call `bower install` behind the scenes.
155+
The command is preconfigured and it will also call `bower install` behind the scenes.
156+
157+
Then you need to instrument the source file with:
158+
159+
npm run instrument
154160

155161
####Running Unit Tests
156162
The easiest way to run the unit tests is to use the npm script:
@@ -190,6 +196,25 @@ Running the tests is done with:
190196

191197
**Note:** You will need to run the protractor on a separate bash
192198

199+
###Code coverage
200+
After running the Karma or Protractor tests by default a coverage will be created for each of them.
201+
202+
To combine the both reports into one single report you need to execute:
203+
204+
npm run cover-combined
205+
206+
After that the default directory where you can open the code coverage is igniteui-angular/coverage/final/lcov/src.
207+
208+
**Running specific coverage:**
209+
210+
To view only the Karma coverage you can see it under *coverage/karma/**/lcov-report/src*.
211+
212+
To view the code coverage only for the Protractor you need to run the command:
213+
214+
npm run cover-protractor
215+
216+
After that the location is the same(igniteui-angular/coverage/final/lcov/src). That is because the Protractor report is not easily readable by default.
217+
193218
---------------------------------------
194219

195220
##What is Ignite UI?

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,33 @@
22
"name": "igniteui-angular",
33
"dependencies": {},
44
"devDependencies": {
5+
"mkdirp": "",
56
"coveralls": "",
67
"grunt": "",
78
"grunt-contrib-jshint": "",
89
"grunt-contrib-uglify": "",
910
"grunt-contrib-watch": "",
1011
"jshint-stylish": "",
1112
"protractor": "",
13+
"protractor-istanbul-plugin": "",
1214
"http-server": "",
1315
"bower": "",
1416
"shelljs": "",
17+
"istanbul-coveralls": "",
1518
"karma": "",
1619
"karma-jasmine": "",
1720
"karma-coverage": "",
1821
"karma-chrome-launcher": "",
1922
"karma-firefox-launcher": "",
2023
"karma-junit-reporter": ""
21-
2224
},
2325
"scripts": {
2426
"postinstall": "bower install",
25-
27+
"instrument": "istanbul instrument ./src/ -o ./instrument/",
28+
29+
"cover-protractor": "rm -rf coverage/tmp && mkdirp coverage/tmp/ && cp coverage/protractor/*.json coverage/tmp/ && istanbul report --include=./coverage/tmp/*.json -dir coverage/final",
30+
"cover-combined": "rm -rf coverage/tmp && mkdirp coverage/tmp/ && cp coverage/karma/**/coverage*.json coverage/tmp/ && cp coverage/protractor/*.json coverage/tmp/ && istanbul report --include=./coverage/tmp/*.json -dir coverage/final",
31+
2632
"prestart": "npm install",
2733
"start": "http-server -a localhost -p 8000 &",
2834

samples/grid/master-detail/app/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict';
1+
"use strict";
22

33
var app = angular.module("app", ["ngResource", "igniteui-directives"]);
44

samples/grid/master-detail/app/controllers/masterDetailController.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
app.controller('masterDetailController',
1+
app.controller("masterDetailController",
22

3-
['$scope', 'dataService',
3+
["$scope", "dataService",
44
function ($scope, dataService) {
55

6-
'use strict';
6+
"use strict";
77

88
$scope.error = null;
99

10-
$scope.message = '';
10+
$scope.message = "";
1111

1212
$scope.selectedHome = null;
1313
$scope.selectedHomeOriginal = null;
1414

1515
$scope.save = function(){
1616
dataService.save($scope.selectedHome).then(function(){
1717
$scope.selectedHome = null;
18-
$scope.message = 'Home saved';
18+
$scope.message = "Home saved";
1919
},
2020
function(error){
2121
$scope.error = error;
@@ -36,24 +36,24 @@ app.controller('masterDetailController',
3636

3737
// **** Grid-related event handlers ********
3838
$scope.homesGridRendered = function(e){
39-
$scope.message = 'Grid is rendered';
39+
$scope.message = "Grid is rendered";
4040
};
4141

4242
$scope.homesGridColumnSorted = function(e, u){
4343
$scope.$apply(function () {
44-
$scope.message = 'Column sorted';
44+
$scope.message = "Column sorted";
4545
});
4646
};
4747

4848
$scope.homesGridPageSelectionChanged = function(e, u){
4949
$scope.$apply(function () {
50-
$scope.message = 'Page index changed';
50+
$scope.message = "Page index changed";
5151
});
5252
};
5353

5454
$scope.homesGridPageSizeChanged = function(e, u){
5555
$scope.$apply(function () {
56-
$scope.message = 'Page size changed';
56+
$scope.message = "Page size changed";
5757
});
5858
};
5959

samples/grid/master-detail/app/services/dataService.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
app.factory('dataService',
1+
app.factory("dataService",
22

3-
['$http', '$q',
3+
["$http", "$q",
44
function($http, $q){
55

6-
'use strict';
6+
"use strict";
77

88
var svc = {
99

1010
getAll: function(){
1111

1212
var deferred = $q.defer();
1313

14-
$http.get('/api/homes').success(deferred.resolve).error(deferred.reject);
14+
$http.get("/api/homes").success(deferred.resolve).error(deferred.reject);
1515

1616
return deferred.promise;
1717
},
1818

1919
save: function (home) {
2020
var deferred = $q.defer();
2121

22-
$http.post('/api/homes', home).success(function (result) {
22+
$http.post("/api/homes", home).success(function (result) {
2323
deferred.resolve(result);
2424
}).error(deferred.reject);
2525

samples/js/data/tasks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
app.factory('tasks', [function () {
1+
app.factory("tasks", [function () {
22
var svc = {
33
data: [
44
{

samples/js/igniteui-sample.js

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict';
1+
"use strict";
22

33
/*
44
The factories are created to provide data and services
@@ -10,12 +10,12 @@
1010
controller.
1111
*/
1212

13-
var app = angular.module('igniteui-sample', ['igniteui-directives']);
13+
var app = angular.module("igniteui-sample", ["igniteui-directives"]);
1414

1515
// controllers
16-
app.controller('gridController',
16+
app.controller("gridController",
1717

18-
['$scope', 'northwind',
18+
["$scope", "northwind",
1919
function ($scope, northwind) {
2020
// only needed until https://github.com/angular/angular.js/issues/6683 is resolved
2121
for (var i = 0; i < northwind.data.length; i++) {
@@ -77,9 +77,9 @@ app.controller('gridController',
7777

7878
}]);
7979

80-
app.controller('comboController',
80+
app.controller("comboController",
8181

82-
['$scope', 'northwind',
82+
["$scope", "northwind",
8383
function ($scope, northwind) {
8484

8585
$scope.northwind = northwind.data;
@@ -91,35 +91,35 @@ app.controller('comboController',
9191

9292
}]);
9393

94-
app.controller('dataChartController',
94+
app.controller("dataChartController",
9595

96-
['$scope', 'populationData',
96+
["$scope", "populationData",
9797
function ($scope, populationData) {
9898

9999
$scope.dataChart = populationData.data;
100100

101101
}]);
102102

103-
app.controller('editorsController',
103+
app.controller("editorsController",
104104

105-
['$scope',
105+
["$scope",
106106
function ($scope) {
107107

108108
$scope.editors = {
109109
currency: 12.1,
110110
date: new Date(),
111-
editor: 'Infragistics',
112-
mask: '134-134-134',
111+
editor: "Infragistics",
112+
mask: "134-134-134",
113113
numeric: 123,
114114
percent: 0.12,
115-
text: 'Ignite UI'
115+
text: "Ignite UI"
116116
};
117117

118118
}]);
119119

120-
app.controller('treeController',
120+
app.controller("treeController",
121121

122-
['$scope', 'productCategories',
122+
["$scope", "productCategories",
123123
function ($scope, productCategories) {
124124

125125
$scope.ProductCategories = productCategories.data;
@@ -159,44 +159,44 @@ app.controller('treeController',
159159
};
160160

161161
$scope.removeSelectedNode = function () {
162-
var selected = $('#tree1').igTree('selectedNode');
162+
var selected = $("#tree1").igTree("selectedNode");
163163
if (selected.path !== null) {
164-
$('#tree1').igTree('removeAt', selected.path);
164+
$("#tree1").igTree("removeAt", selected.path);
165165
} else {
166-
alert('Select a node from the tree first');
166+
alert("Select a node from the tree first");
167167
}
168168
};
169169

170170
}]);
171171

172-
app.controller('hierarchicalGridController',
172+
app.controller("hierarchicalGridController",
173173

174-
['$scope', 'northwindEmployees',
174+
["$scope", "northwindEmployees",
175175
function ($scope, northwindEmployees) {
176176

177177
$scope.northwindEmployees = northwindEmployees.data;
178178

179179
}]);
180180

181-
app.controller('tileManagerController',
181+
app.controller("tileManagerController",
182182

183-
['$scope', 'candidates',
183+
["$scope", "candidates",
184184
function ($scope, candidates) {
185185

186186
$scope.candidates = candidates.data;
187187

188188
}]);
189-
app.controller('treeGridController',
189+
app.controller("treeGridController",
190190

191-
['$scope', 'tasks',
191+
["$scope", "tasks",
192192
function ($scope, tasks) {
193193

194194
$scope.tasks = tasks.data;
195195

196196
}]);
197-
app.controller('pivotGridController',
197+
app.controller("pivotGridController",
198198

199-
['$scope',
199+
["$scope",
200200
function ($scope) {
201201

202202
$scope.pivotData = new $.ig.OlapFlatDataSource({
@@ -218,7 +218,7 @@ app.controller('pivotGridController',
218218
{
219219
caption: "Units Sold", name: "UnitsSold",
220220
// returns a function that will be used as sum aggregator on the 'UnitsSold property' of the data objects
221-
aggregator: $.ig.OlapUtilities.prototype.sumAggregator('UnitsSold')
221+
aggregator: $.ig.OlapUtilities.prototype.sumAggregator("UnitsSold")
222222
}]
223223
},
224224
dimensions: [ // for each dimension name and hierarchies are required
@@ -255,21 +255,21 @@ app.controller('pivotGridController',
255255
measures: "[Measures].[UnitsSold]"
256256
});
257257
}]);
258-
app.controller('pivotGridXmlaController',
258+
app.controller("pivotGridXmlaController",
259259

260-
['$scope',
260+
["$scope",
261261
function ($scope) {
262262
$scope.xmlaDataSource = new $.ig.OlapXmlaDataSource({
263-
serverUrl: 'http://sampledata.infragistics.com/olap/msmdpump.dll',
264-
catalog: 'Adventure Works DW Standard Edition',
265-
cube: 'Adventure Works',
263+
serverUrl: "http://sampledata.infragistics.com/olap/msmdpump.dll",
264+
catalog: "Adventure Works DW Standard Edition",
265+
cube: "Adventure Works",
266266
rows: "[Ship Date].[Calendar]",
267267
columns: "[Delivery Date].[Calendar]",
268268
measures: "[Measures].[Product Gross Profit Margin Status],[Measures].[Product Gross Profit Margin Goal]",
269269
});
270270
}]);
271-
app.controller('htmlEditorController',
272-
['$scope',
271+
app.controller("htmlEditorController",
272+
["$scope",
273273
function ($scope) {
274274
$scope.data = "<p>Ignite UI controls:</p><p><ul><li>igEditors</li><li>igHtmlEditor</li><li>igGrid</li><li>igDataChart</li><li>etc.</li></ul></p>";
275275
}]);

src-samples/src/grid/master-detail/app/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict';
1+
"use strict";
22

33
var app = angular.module("app", ["ngResource", "igniteui-directives"]);
44

0 commit comments

Comments
 (0)