Socket
Socket
Sign inDemoInstall

spectron

Package Overview
Dependencies
Maintainers
4
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spectron - npm Package Compare versions

Comparing version 3.3.0 to 3.4.0

12

CHANGELOG.md

@@ -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 @@

37

lib/application.js

@@ -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)

8

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc