Skip to content

Commit 5fe36a6

Browse files
authored
deps(selenium-webdriver): upgrade to 3.0.0 (#63)
fix test "should wait till the expect to run the flow" - `isPending` exists but it is no longer part of `ManagedPromise` - `isPending` also is no longer exported in `lib/promise.js` - wrote an `isPending` similar to selenium-webdriver in common.js require a minimum node version - selenium-webdriver 3.0.0 requires node >= 6.9.0 - update travis test to use node 6
1 parent 10f7653 commit 5fe36a6

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
- "4"
4+
- "6"
55

66
script:
77
- npm test

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"devDependencies": {
1515
"jasmine": "2.4.1",
1616
"jshint": "2.5.0",
17-
"selenium-webdriver": "^3.0.0-beta-3",
17+
"selenium-webdriver": "^3.0.0",
1818
"typescript": "^2.0.0"
1919
},
2020
"repository": {
@@ -29,5 +29,8 @@
2929
"test": "scripts/test.sh"
3030
},
3131
"license": "MIT",
32+
"engines": {
33+
"node": ">= 6.9.0"
34+
},
3235
"version": "0.1.0-beta.0"
3336
}

spec/adapterSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ describe('webdriverJS Jasmine adapter', function() {
7676

7777
it('should wait till the expect to run the flow', function() {
7878
var promiseA = fakeDriver.getValueA();
79-
expect(promiseA.isPending()).toBe(true);
79+
expect(common.isPending(promiseA)).toBe(true);
8080
expect(promiseA).toEqual('a');
81-
expect(promiseA.isPending()).toBe(true);
81+
expect(common.isPending(promiseA)).toBe(true);
8282
});
8383

8484
it('should compare a promise to a promise', function() {

spec/common.js

+4
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,7 @@ exports.getMatchers = function() {
123123
}
124124
};
125125
};
126+
127+
exports.isPending = function(managedPromise) {
128+
return managedPromise.state_ === 'pending';
129+
};

0 commit comments

Comments
 (0)