Comparing version 3.3.0 to 3.4.0
@@ -0,1 +1,13 @@ | ||
# 3.4.0 | ||
* Supports Electron `1.4.x` releases. | ||
* The `Application.isRunning()` API is now public. | ||
* Added an `Application.getSettings()` API to access the settings specified to | ||
the `Application` constructor. | ||
* Fixed an issue where `waitUntilWindowLoaded()` did not properly resolve when | ||
the `webContents` reported as loaded. | ||
* Fixed an issue where `waitUntilTextExists()` did not properly reject when | ||
the element did not exist or a timeout occurred. | ||
* Fixed an issue where a broken pipe error could occur in certain apps. | ||
# 3.3.0 | ||
@@ -2,0 +14,0 @@ |
@@ -90,2 +90,22 @@ var Accessibility = require('./accessibility') | ||
Application.prototype.getSettings = function () { | ||
return { | ||
host: this.host, | ||
port: this.port, | ||
quitTimeout: this.quitTimeout, | ||
startTimeout: this.startTimeout, | ||
waitTimeout: this.waitTimeout, | ||
connectionRetryCount: this.connectionRetryCount, | ||
connectionRetryTimeout: this.connectionRetryTimeout, | ||
nodePath: this.nodePath, | ||
path: this.path, | ||
args: this.args, | ||
env: this.env, | ||
workingDirectory: this.workingDirectory, | ||
debuggerAddress: this.debuggerAddress, | ||
chromeDriverLogPath: this.chromeDriverLogPath, | ||
requireName: this.requireName | ||
} | ||
} | ||
Application.prototype.exists = function () { | ||
@@ -97,2 +117,6 @@ var self = this | ||
if (typeof self.path !== 'string') { | ||
return reject(Error('Application path must be a string')) | ||
} | ||
fs.stat(self.path, function (error, stat) { | ||
@@ -180,8 +204,11 @@ if (error) return reject(error) | ||
return this.waitUntil(function () { | ||
return this.isExisting(selector).getText(selector).then(function (selectorText) { | ||
return selectorText.indexOf(text) !== -1 | ||
return this.isExisting(selector).then(function (exists) { | ||
if (!exists) return false | ||
return this.getText(selector).then(function (selectorText) { | ||
return selectorText.indexOf(text) !== -1 | ||
}) | ||
}) | ||
}, timeout).then(function () { }, function (error) { | ||
error.message = 'waitUntilTextExists ' + error.message | ||
return error | ||
throw error | ||
}) | ||
@@ -192,3 +219,3 @@ }) | ||
return this.waitUntil(function () { | ||
return this.isWindowLoading().then(function (loading) { | ||
return this.webContents.isLoading().then(function (loading) { | ||
return !loading | ||
@@ -198,3 +225,3 @@ }) | ||
error.message = 'waitUntilWindowLoaded ' + error.message | ||
return error | ||
throw error | ||
}) | ||
@@ -201,0 +228,0 @@ }) |
@@ -34,1 +34,2 @@ #!/usr/bin/env node | ||
appProcess.stdout.pipe(process.stdout) | ||
appProcess.stdin.pipe(process.stdin) |
{ | ||
"name": "spectron", | ||
"version": "3.3.0", | ||
"version": "3.4.0", | ||
"description": "Easily test your Electron apps using ChromeDriver and WebdriverIO.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "standard && mocha" | ||
"test": "mocha && standard" | ||
}, | ||
@@ -30,3 +30,3 @@ "engines": { | ||
"dev-null": "^0.1.1", | ||
"electron-chromedriver": "~1.3.0", | ||
"electron-chromedriver": "~1.4.0", | ||
"request": "^2.65.0", | ||
@@ -39,3 +39,3 @@ "split": "^1.0.0", | ||
"chai-as-promised": "^5.1.0", | ||
"electron-prebuilt": "~1.2.0", | ||
"electron": "~1.4.0", | ||
"mocha": "^2.3.3", | ||
@@ -42,0 +42,0 @@ "standard": "^5.3.1", |
@@ -264,3 +264,3 @@ # <img src="https://cloud.githubusercontent.com/assets/378023/15063284/cf544f2c-1383-11e6-9336-e13bd64b1694.png" width="60px" align="center" alt="Spectron icon"> Spectron | ||
app.rendererProcess.env().then(function (env) { | ||
console.log('main process args: ' + env) | ||
console.log('renderer process env variables: ' + env) | ||
}) | ||
@@ -287,2 +287,15 @@ ``` | ||
#### isRunning() | ||
Checks to determine if the application is running or not. | ||
Returns a `Boolean`. | ||
#### getSettings() | ||
Get all the configured options passed to the `new Application()` constructor. | ||
This will include the default options values currently being used. | ||
Returns an `Object`. | ||
#### client.getMainProcessLogs() | ||
@@ -289,0 +302,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1917255
3184
605
+ Addedcode-point-at@1.1.0(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addedelectron-chromedriver@1.4.1(transitive)
+ Addedelectron-download@3.3.0(transitive)
+ Addedes6-promise@4.2.8(transitive)
+ Addedextract-zip@1.7.0(transitive)
+ Addedfs-extra@0.30.0(transitive)
+ Addedhome-path@1.0.7(transitive)
+ Addedini@1.3.8(transitive)
+ Addedis-fullwidth-code-point@1.0.0(transitive)
+ Addedjsonfile@2.4.0(transitive)
+ Addedklaw@1.3.1(transitive)
+ Addedms@2.0.0(transitive)
+ Addednugget@2.2.0(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedobject-keys@0.4.0(transitive)
+ Addedpath-exists@2.1.0(transitive)
+ Addedpretty-bytes@4.0.2(transitive)
+ Addedprogress-stream@1.2.0(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedreadable-stream@1.1.14(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedsingle-line-log@1.1.2(transitive)
+ Addedspeedometer@0.1.4(transitive)
+ Addedstring-width@1.0.2(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedsumchecker@1.3.1(transitive)
+ Addedthrottleit@0.0.2(transitive)
+ Addedthrough2@0.2.3(transitive)
+ Addedxtend@2.1.2(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedarr-diff@2.0.0(transitive)
- Removedarr-flatten@1.1.0(transitive)
- Removedarray-unique@0.2.1(transitive)
- Removedbraces@1.8.5(transitive)
- Removedbuffer-to-vinyl@1.1.0(transitive)
- Removedchalk@1.1.3(transitive)
- Removedclone@0.2.01.0.4(transitive)
- Removedclone-stats@0.0.1(transitive)
- Removedcommander@2.20.3(transitive)
- Removedconvert-source-map@1.9.0(transitive)
- Removeddecompress@3.0.0(transitive)
- Removeddecompress-tar@3.1.0(transitive)
- Removeddecompress-tarbz2@3.1.0(transitive)
- Removeddecompress-targz@3.1.0(transitive)
- Removeddecompress-unzip@3.4.0(transitive)
- Removedduplexer2@0.1.4(transitive)
- Removedduplexify@3.7.1(transitive)
- Removedelectron-chromedriver@1.3.2(transitive)
- Removedexpand-brackets@0.1.5(transitive)
- Removedexpand-range@1.8.2(transitive)
- Removedextend-shallow@2.0.1(transitive)
- Removedextglob@0.3.2(transitive)
- Removedfile-type@3.9.0(transitive)
- Removedfilename-regex@2.0.1(transitive)
- Removedfill-range@2.2.4(transitive)
- Removedfirst-chunk-stream@1.0.0(transitive)
- Removedfor-in@1.0.2(transitive)
- Removedfor-own@0.1.5(transitive)
- Removedget-stdin@4.0.1(transitive)
- Removedglob@5.0.15(transitive)
- Removedglob-base@0.3.0(transitive)
- Removedglob-parent@2.0.03.1.0(transitive)
- Removedglob-stream@5.3.5(transitive)
- Removedgulp-sourcemaps@1.6.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedis-absolute@0.1.7(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-bzip2@1.0.0(transitive)
- Removedis-dotfile@1.0.3(transitive)
- Removedis-equal-shallow@0.1.3(transitive)
- Removedis-extendable@0.1.1(transitive)
- Removedis-extglob@1.0.02.1.1(transitive)
- Removedis-glob@2.0.13.1.0(transitive)
- Removedis-gzip@1.0.0(transitive)
- Removedis-natural-number@2.1.1(transitive)
- Removedis-number@2.1.04.0.0(transitive)
- Removedis-posix-bracket@0.1.1(transitive)
- Removedis-primitive@2.0.0(transitive)
- Removedis-relative@0.1.3(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedis-tar@1.0.0(transitive)
- Removedis-utf8@0.2.1(transitive)
- Removedis-valid-glob@0.3.0(transitive)
- Removedis-zip@1.0.0(transitive)
- Removedisobject@2.1.0(transitive)
- Removedjson-stable-stringify-without-jsonify@1.0.1(transitive)
- Removedkind-of@3.2.26.0.3(transitive)
- Removedlodash.isequal@4.5.0(transitive)
- Removedmath-random@1.0.4(transitive)
- Removedmerge-stream@1.0.1(transitive)
- Removedmicromatch@2.3.11(transitive)
- Removedobject-assign@2.1.14.1.1(transitive)
- Removedobject.omit@2.0.1(transitive)
- Removedordered-read-streams@0.3.0(transitive)
- Removedparse-glob@3.0.4(transitive)
- Removedpath-dirname@1.0.2(transitive)
- Removedpreserve@0.2.0(transitive)
- Removedrandomatic@3.1.1(transitive)
- Removedread-all-stream@3.1.0(transitive)
- Removedreadable-stream@1.0.343.6.2(transitive)
- Removedregex-cache@0.4.4(transitive)
- Removedrepeat-element@1.1.4(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedreplace-ext@0.0.1(transitive)
- Removedseek-bzip@1.0.6(transitive)
- Removedstat-mode@0.2.2(transitive)
- Removedstream-combiner2@1.1.1(transitive)
- Removedstream-shift@1.0.3(transitive)
- Removedstrip-bom@2.0.0(transitive)
- Removedstrip-bom-stream@1.0.0(transitive)
- Removedstrip-dirs@1.1.1(transitive)
- Removedsum-up@1.0.3(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedthrough2@0.6.52.0.54.0.2(transitive)
- Removedthrough2-filter@2.0.03.1.0(transitive)
- Removedto-absolute-glob@0.1.1(transitive)
- Removedunique-stream@2.3.1(transitive)
- Removeduuid@2.0.3(transitive)
- Removedvali-date@1.0.0(transitive)
- Removedvinyl@0.4.61.2.0(transitive)
- Removedvinyl-assign@1.2.1(transitive)
- Removedvinyl-fs@2.4.4(transitive)
Updatedelectron-chromedriver@~1.4.0