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

Hermione plugin for extend assertView command.

  • 2.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

hermione-assert-view-extended

Hermione plugin for extend assertView command. Inspired hermione-ignore.

Install

npm i -D hermione-assert-view-extended

Usage

Set options for the plugin in your hermione config:

{
    hooks: {
        beforeEach: function(name, selector, options) {
            return this.browser.moveTo(0, 0);
        },
        afterEach: function(name, selector, options) {
            console.log(`Asserted view '${name}' for '${selector}' selector.`);
        }
    },
    globalStyles: {
        animationDisabled: true,
        ignoreElements: [
            '.classname1'
        ],
        invisibleElements: [
            '.classname3'
        ],
        hideElements: [
            '.classname2'
        ],
        customCSS: `
            body {
                background-color: red;
            }
        `
    },
    globalExecute: {
        beforeEach: [
            function(message) {
                alert(message);
            },
            'Hello, world!'
        ],
        afterEach: function() {
            alert('Bye bye!');
        }
    }
}

Options

OptionDefaultDescription
hooksHermione commands which will be called before/after call assertView in then().
hooks.beforeEachHermione commands which will be called before call assertView and first inner execute.
hooks.afterEachHermione commands which will be called after call assertView and last inner execute.
globalStylesCSS injection appended in <head> before call assertView. It will be removed after call assertView.
globalStyles.animationDisabledfalseDisable CSS animation (transition-duration: 0s, animation-duration: 0s, etc.).
globalStyles.ignoreElementsElements will be covered with black rect.
globalStyles.invisibleElementsElements will be hidden with opacity: 0.
globalStyles.hideElementsElements will be hidden with display: none.
globalStyles.customCSSCustom styles.
globalExecuteScripts executed before/after call assertView in the inner execut with other manipulation.
globalExecute.beforeEachJS function executed before call assertView.
globalExecute.afterEachJS function executed after call assertView.

Licence

MIT

Keywords

FAQs

Package last updated on 19 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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