New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@argos-ci/cypress

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@argos-ci/cypress

Visual testing solution to avoid visual regression. Cypress commands and utilities for Argos visual testing.

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
increased by15.53%
Maintainers
1
Weekly downloads
 
Created
Source

@argos-ci/cypress

Cypress commands and utilities for Argos visual testing.

npm version npm dm npm dt

Installation

npm install --save-dev @argos-ci/cypress

And add this line to your cypress/support/index.js file.

import "@argos-ci/cypress/support";

Usage

cy.argosScreenshot command stabilizes the UI and takes a screenshot.

How to take a screenshot with cy.argosScreenshot command

describe("Homepage", () => {
  it("should be stable", () => {
    // Screenshot a full page
    cy.argosScreenshot("home");

    // Screenshot a component
    cy.get("main div.breadcrumb").argosScreenshot("home-breadcrumb");
  });
});

API

cy.argosScreenshot([name][, options])

  • name - The screenshot name; must be unique; default value to test title
  • options - See cy.screenshot command options

Helper attributes

The data-visual-test attributes allow you to control how elements behave in the Argos screenshot.

It is often used to hide changing element like dates.

  • [data-visual-test="transparent"] - Make the element transparent (opacity: 0)
  • [data-visual-test="removed"] - Remove the element (display: none)
  • [data-visual-test="blackout"] - Blacked out the element

How to use an helper to hide a div from a screenshot

<div id="clock" data-visual-test="transparent">
  <!-- the clock code -->
</div>

Keywords

FAQs

Package last updated on 02 Sep 2022

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