Gathering detailed insights and metrics for @percy/cypress
Gathering detailed insights and metrics for @percy/cypress
Gathering detailed insights and metrics for @percy/cypress
Gathering detailed insights and metrics for @percy/cypress
npm install @percy/cypress
Typescript
Module System
Node Version
NPM Version
79.3
Supply Chain
78.4
Quality
76.2
Maintenance
100
Vulnerability
97
License
JavaScript (97.53%)
TypeScript (2.47%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
348 Stars
474 Commits
42 Forks
14 Watchers
33 Branches
46 Contributors
Updated on Apr 23, 2025
Latest Version
3.1.6
Package Id
@percy/cypress@3.1.6
Unpacked Size
10.96 kB
Size
4.61 kB
File Count
6
NPM Version
6.14.18
Node Version
14.21.3
Published on
Apr 18, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Percy visual testing for Cypress.
1$ npm install --save-dev @percy/cli @percy/cypress
Then add to your cypress/support/index.js
file
1import '@percy/cypress'
This is an example using the cy.percySnapshot
command.
1describe('My app', () => { 2 it('should look good', () => { 3 cy.get('body').should('have.class', 'finished-loading'); 4 cy.percySnapshot(); 5 6 cy.get('button').click(); 7 cy.percySnapshot('Clicked button'); 8 }); 9});
Running the test above will result in the following log:
1$ cypress run 2... 3[percy] Percy is not running, disabling snapshots
When running with percy exec
, and your project's
PERCY_TOKEN
, a new Percy build will be created and snapshots will be uploaded to your project.
1$ export PERCY_TOKEN=[your-project-token] 2$ percy exec -- cypress run 3[percy] Percy has started! 4[percy] Created build #1: https://percy.io/[your-project] 5[percy] Running "cypress run" 6... 7[percy] Snapshot taken "My app should look good" 8[percy] Snapshot taken "Clicked button" 9... 10[percy] Stopping percy... 11[percy] Finalized build #1: https://percy.io/[your-project] 12[percy] Done!
cy.percySnapshot([name][, options])
name
- The snapshot name; must be unique to each snapshot; defaults to the full test titleoptions
- See per-snapshot configuration optionspercyThrowErrorOnFailure
- If set to true, it will throw an error when one is encountered. By default, it is set to false, and errors are suppressed.
If you are using uncaught exeception then test test will pass.cy.on("uncaught:exception", (e, runnable) => {});
@percy/migrate
We built a tool to help automate migrating to the new CLI toolchain! Migrating can be done by running the following commands and following the prompts:
1$ npx @percy/migrate 2? Are you currently using @percy/cypress? Yes 3? Install @percy/cli (required to run percy)? Yes 4? Migrate Percy config file? Yes 5? Upgrade SDK to @percy/cypress@3.0.0? Yes
This will automatically run the changes described below for you.
@percy/cli
If you're coming from a pre-3.0 version of this package, make sure to install @percy/cli
after
upgrading to retain any existing scripts that reference the Percy CLI command.
1$ npm install --save-dev @percy/cli
If you're coming from 2.x the health check task, @percy/cypress/task
, is no longer needed and no
longer exists. You should remove this task from your cypress/plugins/index.js
file.
If you have a previous Percy configuration file, migrate it to the newest version with the
config:migrate
command:
1$ percy config:migrate
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
Found 13/15 approved changesets -- score normalized to 8
Reason
SAST tool is not run on all commits -- score normalized to 4
Details
Reason
1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
11 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More