Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hermione-assert-view-extended

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hermione-assert-view-extended - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

9

index.js
'use strict';
module.exports = (hermione, opts = {}) => {
const commands = opts.commands || {};
const globalStyles = opts.globalStyles || {};

@@ -63,2 +64,6 @@ const globalExecute = opts.globalExecute || {};

if (commands.before && typeof commands.before.call !== 'undefined') {
await browser.then(() => commands.before.call({ browser }, name, selector, options));
}
await browser.execute(function(styleString, beforeExecute) {

@@ -93,2 +98,6 @@ var head = document.head || document.getElementsByTagName('head')[0];

}, afterExecute);
if (commands.after && typeof commands.after.call !== 'undefined') {
await browser.then(() => commands.after.call({ browser }, name, selector, options));
}
}, true);

@@ -95,0 +104,0 @@ });

2

package.json
{
"name": "hermione-assert-view-extended",
"version": "0.1.1",
"version": "0.2.0",
"description": "Hermione plugin for extend assertView command.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,2 +16,10 @@ # hermione-assert-view-extended

{
commands: {
before: function(name, selector, options) {
return this.browser.moveTo(0, 0);
},
after: function(name, selector, options) {
console.log(`Asserted view '${name}' for '${selector}' selector.`);
}
},
globalStyles: {

@@ -52,2 +60,5 @@ animationDisable: true,

| --- | --- | --- |
| `commands` | | Hermione commands which will be called before/after call assertView in `then()`. |
| `commands.before` | | Hermione commands which will be called before call assertView and first inner execute. |
| `commands.after` | | Hermione commands which will be called after call assertView and last inner execute. |
| `globalStyles` | | CSS injection appended in `<head>` before call assertView. It will be removed after call assertView. |

@@ -54,0 +65,0 @@ | `globalStyles.animationDisable` | `false` | Disable CSS animation (`transition-duration: 0s`, `animation-duration: 0s`, etc.). |

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