Skip to content

Commit 846d3c9

Browse files
Portugal, MarceloPortugal, Marcelo
authored andcommitted
Updating dev dependencies and unit tests, as well as fixing build settings to avoid warnings/errors
1 parent b6dd44c commit 846d3c9

5 files changed

Lines changed: 43 additions & 38 deletions

File tree

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
language: node_js
22

33
node_js:
4-
- 0.10
4+
- 4.2.1
55

66
before_script:
77
- export DISPLAY=:99.0
88
- sh -e /etc/init.d/xvfb start
99
- npm install --quiet -g grunt-cli karma bower protractor
1010
- npm install
1111
- bower install
12+
- node ./node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager update --standalone
1213
- node ./node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager start > /dev/null &
1314
- sleep 5
1415

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-gridster",
33
"version": "0.13.10",
4-
"main": ["src/angular-gridster.js", "dist/angular-gridster.min.css"],
4+
"main": ["src/angular-gridster.js", "src/angular-gridster.less"],
55
"dependencies": {
66
"angular": ">= 1.2.0",
77
"javascript-detect-element-resize": "~0.5.1"

karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = function(config) {
5656
// - Safari (only Mac)
5757
// - PhantomJS
5858
// - IE (only Windows)
59-
browsers: ['PhantomJS2'],
59+
browsers: ['PhantomJS'],
6060
// Continuous Integration mode
6161
// if true, it capture browsers, run tests and exit
6262
singleRun: false

package.json

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,33 @@
66
"homepage": "http://manifestwebdesign.github.io/angular-gridster",
77
"authors": "https://github.com/ManifestWebDesign/angular-gridster/graphs/contributors",
88
"devDependencies": {
9-
"grunt": "^0.4.5",
10-
"grunt-bump": "0.0.14",
11-
"grunt-contrib-concat": "~0.4.0",
12-
"grunt-contrib-connect": "~0.7.1",
13-
"grunt-contrib-jshint": "~0.10.0",
14-
"grunt-contrib-less": "~0.11.0",
15-
"grunt-contrib-uglify": "~0.4.0",
16-
"grunt-contrib-watch": "~0.6.1",
17-
"grunt-jsbeautifier": "^0.2.12",
18-
"grunt-karma": "~0.8.3",
19-
"grunt-protractor-runner": "~0.2.4",
20-
"karma": "~0.12.16",
21-
"karma-chrome-launcher": "~0.1.3",
22-
"karma-coverage": "~0.2.1",
23-
"karma-firefox-launcher": "~0.1.3",
24-
"karma-jasmine": "~0.2.2",
25-
"karma-mocha": "~0.1.3",
26-
"karma-phantomjs2-launcher": "^0.4.0",
27-
"karma-script-launcher": "~0.1.0",
28-
"matchdep": "~0.3.0",
29-
"mocha": "~1.19.0",
30-
"time-grunt": "~0.3.1"
9+
"grunt": "^1.0.1",
10+
"grunt-bump": "0.8.0",
11+
"grunt-contrib-concat": "~1.0.1",
12+
"grunt-contrib-connect": "~1.0.2",
13+
"grunt-contrib-jshint": "~1.0.0",
14+
"grunt-contrib-less": "~1.3.0",
15+
"grunt-contrib-uglify": "~1.0.1",
16+
"grunt-contrib-watch": "~1.0.0",
17+
"grunt-jsbeautifier": "^0.2.13",
18+
"grunt-karma": "~2.0.0",
19+
"grunt-protractor-runner": "~3.2.0",
20+
"jasmine-core": "~2.4.1",
21+
"karma": "~1.1.1",
22+
"karma-chrome-launcher": "~1.0.1",
23+
"karma-coverage": "~1.1.0",
24+
"karma-firefox-launcher": "~1.0.0",
25+
"karma-jasmine": "~1.0.2",
26+
"karma-mocha": "~1.1.1",
27+
"karma-phantomjs-launcher": "^1.0.0",
28+
"karma-script-launcher": "~1.0.0",
29+
"lodash": "~4.13.1",
30+
"matchdep": "~1.0.1",
31+
"mocha": "~2.5.3",
32+
"time-grunt": "~1.3.0"
3133
},
3234
"engines": {
33-
"node": ">=0.10.0"
35+
"node": ">=4.2.1"
3436
},
3537
"scripts": {
3638
"test": "grunt test",

test/e2e/gridster.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('Controller: GridsterCtrl', function() {
3636
expect(size.width).toBeGreaterThan(0);
3737
width = size.width;
3838
}).then(function() {
39-
return firstItem.findElement(by.model('item.sizeX'));
39+
return firstItem.element(by.model('item.sizeX'));
4040
}).then(function(input) {
4141
return input.sendKeys('2').then(function() {
4242
input.sendKeys(protractor.Key.TAB);
@@ -49,17 +49,19 @@ describe('Controller: GridsterCtrl', function() {
4949
});
5050

5151
it('should resize the row widths and heights', function() {
52+
var initialSize;
53+
5254
browser.driver.manage().window().setSize(1200, 1200);
53-
firstItem.getSize().then(function(size) {
54-
expect(size.width).toBe(307);
55-
expect(size.height).toBe(143);
56-
});
57-
// .then(function() {
58-
// browser.driver.manage().window().setSize(1000, 1000);
59-
// firstItem.getSize().then(function(size) {
60-
// expect(size.width).toBe(271);
61-
// expect(size.height).toBe(126);
62-
// });
63-
// });
55+
firstItem.getSize()
56+
.then(function setInitialSize(size) {
57+
initialSize = size;
58+
})
59+
.then(function() {
60+
browser.driver.manage().window().setSize(1000, 1000);
61+
firstItem.getSize().then(function(newSize) {
62+
expect(newSize.width).toBeLessThan(initialSize.width);
63+
expect(newSize.height).toBeLessThan(initialSize.height);
64+
});
65+
});
6466
});
6567
});

0 commit comments

Comments
 (0)