Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
cypress-lens
Advanced tools
Developed in
Join us, we're hiring.
Based on Cypress Visual Regression
Module for visual regression testing and reporting for Cypress.
Install:
$ npm install cypress-lens
Add the following config to your cypress.config.js file:
const { defineConfig } = require("cypress");
const getCompareSnapshotsPlugin = require("cypress-lens/dist/plugin");
module.exports = defineConfig({
screenshotsFolder: "./cypress/snapshots/actual",
trashAssetsBeforeRuns: true,
video: false,
e2e: {
setupNodeEvents(on, config) {
getCompareSnapshotsPlugin(on, config);
},
},
});
Add the command to cypress/support/commands.js:
const compareSnapshotCommand = require("cypress-lens/dist/command");
compareSnapshotCommand();
Make sure you import commands.js in cypress/support/e2e.js:
import "./commands";
If you're using TypeScript, use files with a .ts
extension, as follows:
cypress/cypress.config.ts
import { defineConfig } from "cypress";
import getCompareSnapshotsPlugin from "cypress-lens/dist/plugin";
export default defineConfig({
env: {
screenshotsFolder: "./cypress/snapshots/actual",
trashAssetsBeforeRuns: true,
video: false,
},
e2e: {
setupNodeEvents(on, config) {
getCompareSnapshotsPlugin(on, config);
},
},
});
cypress/support/commands.ts
import compareSnapshotCommand from "cypress-lens/dist/command";
compareSnapshotCommand();
cypress/tsconfig.json
{
"compilerOptions": {
"types": [
"cypress",
"cypress-lens"
]
}
}
FAQs
Module for visual regression testing and reporting in Cypress
The npm package cypress-lens receives a total of 858 weekly downloads. As such, cypress-lens popularity was classified as not popular.
We found that cypress-lens demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.