marionette-helper
Advanced tools
Comparing version 0.3.1 to 0.3.2
19
index.js
@@ -0,4 +1,4 @@ | ||
'use strict'; | ||
var Marionette = require('marionette-client'); | ||
/** | ||
@@ -142,3 +142,14 @@ * @param {Marionette.Client} client Marionette client to use. | ||
client.waitFor(el.displayed.bind(el)); | ||
client.waitFor(function() { | ||
try { | ||
return el.displayed.call(el); | ||
} catch (err) { | ||
if (err && err.type === 'ElementNotAccessibleError') { | ||
// the element is not yet accessible | ||
return false; | ||
} | ||
// the client threw an unexpected error, rethrow it | ||
throw err; | ||
} | ||
}); | ||
return el; | ||
@@ -186,2 +197,6 @@ }, | ||
} catch (err) { | ||
if (err && err.type === 'ElementNotAccessibleError') { | ||
// element is still accessible to Accessibility API | ||
return false; | ||
} | ||
if (err && err.type === 'StaleElementReference') { | ||
@@ -188,0 +203,0 @@ // the element was removed from the dom, we are done |
@@ -1,44 +0,1 @@ | ||
{ | ||
"name": "marionette-helper", | ||
"version": "0.3.1", | ||
"author": { | ||
"name": "The Gaia Team", | ||
"email": "dev-gaia@lists.mozilla.org" | ||
}, | ||
"peerDependencies": { | ||
"marionette-client": ">=1.0.0" | ||
}, | ||
"dependencies": { | ||
"marionette-apps": "~0.3.3" | ||
}, | ||
"devDependencies": { | ||
"marionette-host-environment": "0.3.3", | ||
"marionette-js-runner": "~0.0.1", | ||
"mozilla-download": "~0.2.1", | ||
"mocha": "1.12.0", | ||
"sinon": "1.7.2" | ||
}, | ||
"keywords": [ | ||
"firefox", | ||
"firefox os", | ||
"gecko", | ||
"marionette", | ||
"mozilla", | ||
"test" | ||
], | ||
"scripts": { | ||
"test": "make" | ||
}, | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/mozilla-b2g/marionette-helper.git" | ||
} | ||
} | ||
{"name":"marionette-helper","version":"0.3.2","author":{"name":"The Gaia Team","email":"dev-gaia@lists.mozilla.org"},"dependencies":{"marionette-apps":"0.3.13"}} |
@@ -5,4 +5,1 @@ marionette-helper | ||
A collection of useful methods to augment the marionette js client when using the TcpSync driver. | ||
[![Build | ||
Status](https://travis-ci.org/mozilla-b2g/marionette-helper.png?branch=master)](https://travis-ci.org/mozilla-b2g/marionette-helper) |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1
0
1
24354
9
673
5
1
- Removedasap@2.0.6(transitive)
- Removedasync@0.2.10(transitive)
- Removeddebug@0.6.0(transitive)
- Removedfind-port@1.0.1(transitive)
- Removedjson-wire-protocol@1.0.0(transitive)
- Removedmarionette-client@1.9.5(transitive)
- Removedpromise@7.0.4(transitive)
- Removedsocket-retry-connect@0.0.1(transitive)
- Removedsockit-to-me@1.0.2(transitive)
Updatedmarionette-apps@0.3.13