Skip to content
This repository was archived by the owner on Jan 7, 2022. It is now read-only.

Commit f5f3115

Browse files
authored
[WIP] E2e/sorting (#36) (#39)
* E2e/sorting (#36) * Initial version of the e2e tests for multiple column sorting * Added test for single column sorting * Remove initial e2e setup test * Refactored duplicate code from sorting e2e tests * Remove whitespace from tests * perf change to default options * release files * fixed readme, added e2e to npm scripts * updated e2e npm script * adding to eslintignore, adding protractor to eslint * updated protractor conf, moved e2e files to test/protractor/ * moved protractor plugin to protractor folder, updated tests * removed .count()
1 parent 5d62cf6 commit f5f3115

14 files changed

Lines changed: 138 additions & 73 deletions

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ node_modules
33
jspm_packages
44
bower_components
55
release
6+
dist
7+
test/coverage

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
It was engineered from its conception to handle thousands of rows without sacrificing performance. It was built for modern browsers using _ES6, CSS3 and HTML5_ and **only supports [Evergreen Browsers](http://eisenbergeffect.bluespire.com/evergreen-browsers/) and Angular >= 1.4.x and < 2.0.0**.
1414

15-
Sadly, this project is **not Angular2 upgrade compatible**. Fortunately, we have authored [angular2-data-table](https://github.com/swimlane/angular2-data-table) which is the successor to this project. **We are going to slowly be transitioning this project maintenance mode**. We will continue to provide feedback to the community and accept PRs but we won't be doing any major new development.
15+
Sadly, this project is **not Angular2 upgrade compatible**. Swimlane has authored an Angular 2 compatible table here: [angular2-data-table](https://github.com/swimlane/angular2-data-table) which is the successor to this project. ~~**We are going to slowly be transitioning this project maintenance mode**. We will continue to provide feedback to the community and accept PRs but we won't be doing any major new development.~~ Major new development is happening on this fork and there will be breaking changes, appropriately noted with [semvar](http://semver.org/) versioning.
1616

1717
See live demos [here]( http://jonshaffer.github.io/angular-data-table/).
1818

config.js

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
11
System.config({
2-
baseURL: "",
2+
baseURL: '',
33
defaultJSExtensions: true,
4-
transpiler: "babel",
4+
transpiler: 'babel',
55
babelOptions: {
6-
"optional": [
7-
"runtime"
6+
'optional': [
7+
'runtime'
88
]
99
},
1010
paths: {
11-
"*": "dist/*.js",
12-
"github:*": "jspm_packages/github/*",
13-
"npm:*": "jspm_packages/npm/*"
11+
'*': 'dist/*.js',
12+
'github:*': 'jspm_packages/github/*',
13+
'npm:*': 'jspm_packages/npm/*'
1414
},
1515

1616
map: {
17-
"angular": "npm:angular@1.5.8",
18-
"babel": "npm:babel-core@5.8.38",
19-
"babel-runtime": "npm:babel-runtime@5.8.38",
20-
"core-js": "npm:core-js@1.2.7",
21-
"github:jspm/nodelibs-assert@0.1.0": {
22-
"assert": "npm:assert@1.4.1"
17+
'angular': 'npm:angular@1.5.8',
18+
'babel': 'npm:babel-core@5.8.38',
19+
'babel-runtime': 'npm:babel-runtime@5.8.38',
20+
'core-js': 'npm:core-js@1.2.7',
21+
'github:jspm/nodelibs-assert@0.1.0': {
22+
'assert': 'npm:assert@1.4.1'
2323
},
24-
"github:jspm/nodelibs-buffer@0.1.0": {
25-
"buffer": "npm:buffer@3.6.0"
24+
'github:jspm/nodelibs-buffer@0.1.0': {
25+
'buffer': 'npm:buffer@3.6.0'
2626
},
27-
"github:jspm/nodelibs-path@0.1.0": {
28-
"path-browserify": "npm:path-browserify@0.0.0"
27+
'github:jspm/nodelibs-path@0.1.0': {
28+
'path-browserify': 'npm:path-browserify@0.0.0'
2929
},
30-
"github:jspm/nodelibs-process@0.1.2": {
31-
"process": "npm:process@0.11.9"
30+
'github:jspm/nodelibs-process@0.1.2': {
31+
'process': 'npm:process@0.11.9'
3232
},
33-
"github:jspm/nodelibs-util@0.1.0": {
34-
"util": "npm:util@0.10.3"
33+
'github:jspm/nodelibs-util@0.1.0': {
34+
'util': 'npm:util@0.10.3'
3535
},
36-
"github:jspm/nodelibs-vm@0.1.0": {
37-
"vm-browserify": "npm:vm-browserify@0.0.4"
36+
'github:jspm/nodelibs-vm@0.1.0': {
37+
'vm-browserify': 'npm:vm-browserify@0.0.4'
3838
},
39-
"npm:angular@1.5.8": {
40-
"process": "github:jspm/nodelibs-process@0.1.2"
39+
'npm:angular@1.5.8': {
40+
'process': 'github:jspm/nodelibs-process@0.1.2'
4141
},
42-
"npm:assert@1.4.1": {
43-
"assert": "github:jspm/nodelibs-assert@0.1.0",
44-
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
45-
"process": "github:jspm/nodelibs-process@0.1.2",
46-
"util": "npm:util@0.10.3"
42+
'npm:assert@1.4.1': {
43+
'assert': 'github:jspm/nodelibs-assert@0.1.0',
44+
'buffer': 'github:jspm/nodelibs-buffer@0.1.0',
45+
'process': 'github:jspm/nodelibs-process@0.1.2',
46+
'util': 'npm:util@0.10.3'
4747
},
48-
"npm:babel-runtime@5.8.38": {
49-
"process": "github:jspm/nodelibs-process@0.1.2"
48+
'npm:babel-runtime@5.8.38': {
49+
'process': 'github:jspm/nodelibs-process@0.1.2'
5050
},
51-
"npm:buffer@3.6.0": {
52-
"base64-js": "npm:base64-js@0.0.8",
53-
"child_process": "github:jspm/nodelibs-child_process@0.1.0",
54-
"fs": "github:jspm/nodelibs-fs@0.1.2",
55-
"ieee754": "npm:ieee754@1.1.8",
56-
"isarray": "npm:isarray@1.0.0",
57-
"process": "github:jspm/nodelibs-process@0.1.2"
51+
'npm:buffer@3.6.0': {
52+
'base64-js': 'npm:base64-js@0.0.8',
53+
'child_process': 'github:jspm/nodelibs-child_process@0.1.0',
54+
'fs': 'github:jspm/nodelibs-fs@0.1.2',
55+
'ieee754': 'npm:ieee754@1.1.8',
56+
'isarray': 'npm:isarray@1.0.0',
57+
'process': 'github:jspm/nodelibs-process@0.1.2'
5858
},
59-
"npm:core-js@1.2.7": {
60-
"fs": "github:jspm/nodelibs-fs@0.1.2",
61-
"path": "github:jspm/nodelibs-path@0.1.0",
62-
"process": "github:jspm/nodelibs-process@0.1.2",
63-
"systemjs-json": "github:systemjs/plugin-json@0.1.2"
59+
'npm:core-js@1.2.7': {
60+
'fs': 'github:jspm/nodelibs-fs@0.1.2',
61+
'path': 'github:jspm/nodelibs-path@0.1.0',
62+
'process': 'github:jspm/nodelibs-process@0.1.2',
63+
'systemjs-json': 'github:systemjs/plugin-json@0.1.2'
6464
},
65-
"npm:inherits@2.0.1": {
66-
"util": "github:jspm/nodelibs-util@0.1.0"
65+
'npm:inherits@2.0.1': {
66+
'util': 'github:jspm/nodelibs-util@0.1.0'
6767
},
68-
"npm:path-browserify@0.0.0": {
69-
"process": "github:jspm/nodelibs-process@0.1.2"
68+
'npm:path-browserify@0.0.0': {
69+
'process': 'github:jspm/nodelibs-process@0.1.2'
7070
},
71-
"npm:process@0.11.9": {
72-
"assert": "github:jspm/nodelibs-assert@0.1.0",
73-
"fs": "github:jspm/nodelibs-fs@0.1.2",
74-
"vm": "github:jspm/nodelibs-vm@0.1.0"
71+
'npm:process@0.11.9': {
72+
'assert': 'github:jspm/nodelibs-assert@0.1.0',
73+
'fs': 'github:jspm/nodelibs-fs@0.1.2',
74+
'vm': 'github:jspm/nodelibs-vm@0.1.0'
7575
},
76-
"npm:util@0.10.3": {
77-
"inherits": "npm:inherits@2.0.1",
78-
"process": "github:jspm/nodelibs-process@0.1.2"
76+
'npm:util@0.10.3': {
77+
'inherits': 'npm:inherits@2.0.1',
78+
'process': 'github:jspm/nodelibs-process@0.1.2'
7979
},
80-
"npm:vm-browserify@0.0.4": {
81-
"indexof": "npm:indexof@0.0.1"
80+
'npm:vm-browserify@0.0.4': {
81+
'indexof': 'npm:indexof@0.0.1'
8282
}
8383
}
8484
});

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@
2626
}
2727
],
2828
"scripts": {
29-
"start": "node ./node_modules/gulp/bin/gulp.js watch serve",
29+
"start": "node ./node_modules/gulp/bin/gulp.js serve watch",
3030
"release": "node ./node_modules/gulp/bin/gulp.js release",
3131
"test": "node ./node_modules/gulp/bin/gulp.js test",
32+
"e2e": "protractor test/protractor.conf.js",
3233
"report-coverage": "codecov"
3334
},
3435
"peerDependencies": {
@@ -53,7 +54,9 @@
5354
"browser-sync": "^2.7.2",
5455
"browserify": "^13.1.1",
5556
"browserify-istanbul": "^2.0.0",
57+
"codecov": "^1.0.1",
5658
"del": "^2.2.0",
59+
"eslint-plugin-protractor": "^1.32.0",
5760
"gulp": "^3.8.11",
5861
"gulp-angular-protractor": "^0.3.0",
5962
"gulp-babel": "6.1.2",

release/dataTable.cjs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/dataTable.es6.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,10 +726,10 @@ class DataTableController {
726726
/**
727727
* Creates and extends default options for the grid control
728728
*/
729-
defaults(){
729+
defaults() {
730730
this.expanded = this.expanded || {};
731731

732-
this.options = angular.extend(angular.copy(TableDefaults), this.options);
732+
this.options = Object.assign({}, TableDefaults, this.options);
733733

734734
angular.forEach(TableDefaults.paging, (v,k) => {
735735
if(!this.options.paging[k]){

release/dataTable.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/dataTable.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/DataTableController.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ export class DataTableController {
5454
/**
5555
* Creates and extends default options for the grid control
5656
*/
57-
defaults(){
57+
defaults() {
5858
this.expanded = this.expanded || {};
5959

60-
this.options = angular.extend(angular.copy(TableDefaults), this.options);
60+
this.options = Object.assign({}, TableDefaults, this.options);
6161

6262
angular.forEach(TableDefaults.paging, (v,k) => {
6363
if(!this.options.paging[k]){

test/protractor.conf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const config = {
22
framework: 'jasmine',
3-
specs: ['../src/**/*.e2e.js']
3+
specs: ['./protractor/*.e2e.js'],
4+
baseUrl: 'http://localhost:9000/'
45
};
56

67
if (process.env.TRAVIS) {

0 commit comments

Comments
 (0)