Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 9d69a81

Browse files
cnishinaheathkit
authored andcommitted
deps(typescript): use typescript@~2.0.0 (#4062)
- move noCF tests to install and fix reference to protractor - changed element.ts to not use keyof - remove gulp task tsc:spec
1 parent 75af8f4 commit 9d69a81

16 files changed

+36
-31
lines changed

exampleTypescript/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"@types/jasmine": "^2.5.38",
1414
"jasmine": "^2.4.1",
1515
"protractor": "file:../",
16-
"typescript": "^2.1.1"
16+
"typescript": "~2.0.0"
17+
},
18+
"devDependencies": {
19+
"@types/jasminewd2": "^2.0.0"
1720
}
1821
}

gulpfile.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,14 @@ gulp.task('tsc', function(done) {
9494
runSpawn(done, 'node', ['node_modules/typescript/bin/tsc']);
9595
});
9696

97-
gulp.task('tsc:spec', function(done) {
98-
runSpawn(done, 'node', ['node_modules/typescript/bin/tsc', '-p', 'ts_spec_config.json']);
99-
});
10097

10198
gulp.task('prepublish', function(done) {
102-
runSequence('checkVersion', 'jshint', 'tsc', 'built:copy', 'tsc:spec', done);
99+
runSequence('checkVersion', 'jshint', 'tsc', 'built:copy', done);
103100
});
104101

105102
gulp.task('pretest', function(done) {
106103
runSequence('checkVersion',
107-
['webdriver:update', 'jshint', 'tslint', 'format'], 'tsc', 'built:copy', 'tsc:spec', done);
104+
['webdriver:update', 'jshint', 'tslint', 'format'], 'tsc', 'built:copy', done);
108105
});
109106

110107
gulp.task('default',['prepublish']);

lib/element.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let WEB_ELEMENT_FUNCTIONS = [
1717
'click', 'sendKeys', 'getTagName', 'getCssValue', 'getAttribute', 'getText', 'getSize',
1818
'getLocation', 'isEnabled', 'isSelected', 'submit', 'clear', 'isDisplayed', 'getId',
1919
'takeScreenshot'
20-
] as (keyof WebdriverWebElement)[];
20+
];
2121

2222
/**
2323
* ElementArrayFinder is used for operations on an array of elements (as opposed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@types/node": "^6.0.46",
1616
"@types/q": "^0.0.32",
1717
"@types/selenium-webdriver": "~2.53.39",
18-
"blocking-proxy": "0.0.4",
18+
"blocking-proxy": "0.0.5",
1919
"chalk": "^1.1.3",
2020
"glob": "^7.0.3",
2121
"jasmine": "^2.5.3",
@@ -54,7 +54,7 @@
5454
"semver": "^5.3.0",
5555
"tslint": "~4.3.0",
5656
"tslint-eslint-rules": "^3.2.0",
57-
"typescript": "^2.0.0",
57+
"typescript": "~2.0.0",
5858
"vrsource-tslint-rules": "^4.0.1"
5959
},
6060
"repository": {

scripts/test.js

-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ var passingTests = [
3838
'node built/cli.js spec/noGlobalsConf.js',
3939
'node built/cli.js spec/angular2Conf.js',
4040
'node built/cli.js spec/hybridConf.js',
41-
'node built/cli.js spec/built/noCFSmokeConf.js',
42-
'node built/cli.js spec/built/noCFPluginConf.js',
4341
'node scripts/driverProviderAttachSession.js',
4442
'node scripts/errorTest.js',
4543
// Interactive Element Explorer tasks

spec/install/.gitignore

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
node_modules
2-
typings
3-
conf.js
4-
browserts_spec.js
5-
typescript_conf.js
6-
typescript_spec.js
72
npm-debug.log
3+
tmp/

spec/install/conf.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {Config} from 'protractor';
22

3-
var env = require('../environment');
3+
var env = require('../../environment');
44

55
export let config: Config = {
66
seleniumAddress: env.seleniumAddress,

spec/ts/noCF/plugin_spec.ts spec/install/noCF/plugin_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {browser, protractor} from '../../..';
1+
import {browser, protractor} from 'protractor';
22

33
describe('category', function() {
44
it('name', async function() {

spec/ts/noCF/smoke_spec.ts spec/install/noCF/smoke_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Based off of spec/basic/elements_spec.js
22
import * as q from 'q';
33

4-
import {$, $$, browser, by, By, element, ElementArrayFinder, ElementFinder, ExpectedConditions, promise as ppromise, WebElement} from '../../..';
4+
import {$, $$, browser, by, By, element, ElementArrayFinder, ElementFinder, ExpectedConditions, promise as ppromise, WebElement} from 'protractor';
55

66
describe('verify control flow is off', function() {
77
it('should have set webdriver.promise.USE_PROMISE_MANAGER', () => {

spec/ts/noCFPluginConf.ts spec/install/noCFPluginConf.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as q from 'q';
2-
import {Config, protractor} from '../..';
2+
import {Config, protractor} from 'protractor';
33
import {promise as wdpromise} from 'selenium-webdriver';
4-
const env = require('../environment.js');
4+
const env = require('../../environment');
55

66
export let config: Config = {
77
seleniumAddress: env.seleniumAddress,

spec/ts/noCFSmokeConf.ts spec/install/noCFSmokeConf.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Config} from '../..';
2-
const env = require('../environment.js');
2+
const env = require('../../environment');
33

44
export let config: Config = {
55
seleniumAddress: env.seleniumAddress,

spec/install/package.json

+11-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@
44
"description": "e2e typescript => javascript => running",
55
"main": "index.js",
66
"scripts": {
7-
"tsc": "node_modules/typescript/bin/tsc",
8-
"test": "protractor conf.js"
7+
"tsc": "tsc",
8+
"test": "protractor tmp/conf.js"
99
},
1010
"author": "",
1111
"license": "MIT",
1212
"dependencies": {
1313
"@types/jasmine": "^2.5.38",
14+
"@types/selenium-webdriver": "^2.53.39",
1415
"protractor": "file:../../",
16+
"q": "^1.4.1",
1517
"rimraf": "^2.5.4",
16-
"typescript": "^2.1.1"
18+
"selenium-webdriver": "^3.0.1",
19+
"typescript": "~2.0.0"
20+
},
21+
"devDependencies": {
22+
"@types/jasmine": "^2.5.41",
23+
"@types/jasminewd2": "^2.0.0",
24+
"@types/q": "0.0.32"
1725
}
1826
}

spec/install/test.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,7 @@ function test(file) {
6060

6161
install();
6262
tsc();
63-
test('conf.js');
64-
test('typescript_conf.js');
63+
test('tmp/conf.js');
64+
test('tmp/typescript_conf.js');
65+
test('tmp/noCFSmokeConf.js');
66+
test('tmp/noCFPluginConf.js');

spec/install/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"sourceMap": false,
77
"declaration": false,
88
"noImplicitAny": false,
9-
"types": ["node", "jasmine"]
9+
"types": ["node", "jasmine"],
10+
"outDir": "tmp"
1011
},
1112
"exclude": [
1213
"node_modules",

ts_spec_config.json spec/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"declaration": true,
88
"removeComments": false,
99
"noImplicitAny": true,
10-
"outDir": "spec/built",
10+
"outDir": "built",
1111
"types": [
1212
"jasmine", "jasminewd2", "node",
1313
"chalk", "glob", "minimatch",
@@ -16,6 +16,6 @@
1616
]
1717
},
1818
"include": [
19-
"spec/ts"
19+
"ts"
2020
]
2121
}

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
"website",
1717
"scripts",
1818
"exampleTypescript",
19-
"spec"
19+
"spec/install"
2020
]
2121
}

0 commit comments

Comments
 (0)