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.

  • 3.2.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,
        redraw: 'soft',
        // Elements will be covered with black rect.
        ignoreElements: [
            '.classname1'
        ],
        // Elements will be hidden with `opacity: 0`.
        invisibleElements: [
            '.classname3'
        ],
        // Elements will be hidden with `display: none`.
        hideElements: [
            '.classname2'
        ],
        customCSS: `
            body {
                background-color: red;
            }
        `
    }
}

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.redrawfalseBowser redraw page after apply styles.
  • 'soft', 'medium' — only repaint without reflow;
  • 'hard' — reflow and repaint.
globalStyles.redrawElements['body']Elements will be redrawed.
globalStyles.redrawTimeoutTimeout after redraw elements.
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.

Licence

MIT

Keywords

FAQs

Package last updated on 03 Mar 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