Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@gapminder/percy-protractor
Advanced tools
Protractor client library for visual testing with Percy
Percy visual testing for Protractor.
$ npm install --save-dev @percy/cli @percy/protractor
This is an example using the percySnapshot()
function using
async/await.
import percySnapshot from '@percy/protractor';
describe('angularjs homepage', function() {
it('should greet the named user', async function() {
await browser.get('http://www.angularjs.org');
await percySnapshot('AngularJS homepage');
await element(by.model('yourName')).sendKeys('Percy');
var greeting = element(by.binding('yourName'));
expect(await greeting.getText()).toEqual('Hello Percy!');
await percySnapshot('AngularJS homepage greeting');
});
});
Running the test above will result in the following log:
$ protractor conf.js
...
[percy] Percy is not running, disabling snapshots
✓ angularjs homepage should greet the named user
1 passing (1s)
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.
$ export PERCY_TOKEN=[your-project-token]
$ percy exec -- protractor conf.js
[percy] Percy has started!
[percy] Created build #1: https://percy.io/[your-project]
[percy] Running "protractor conf.js"
...
[percy] Snapshot taken "AngularJS homepage"
[percy] Snapshot taken "AngularJS homepage greeting"
✓ angularjs homepage should greet the named user
1 passing (1s)
...
[percy] Stopping percy...
[percy] Finalized build #1: https://percy.io/[your-project]
[percy] Done!
percySnapshot(name[, options])
percySnapshot(browser, name[, options])
(standalone mode only)
browser
(required) - The Protractor browser objectname
(required) - The snapshot name; must be unique to each snapshotoptions
- See per-snapshot configuration options@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:
$ npx @percy/migrate
? Are you currently using @percy/protractor? Yes
? Install @percy/cli (required to run percy)? Yes
? Migrate Percy config file? Yes
? Upgrade SDK to @percy/protractor@2.0.0? Yes
This will automatically run the changes described below for you.
If you're coming from a pre-2.0 version of this package, the percySnapshot
function is now the default
export.
// before
const { percySnapshot } = require('@percy/protractor');
// after
const percySnapshot = require('@percy/protractor');
If you have a previous Percy configuration file, migrate it to the newest version with the
config:migrate
command:
$ percy config:migrate
FAQs
Protractor client library for visual testing with Percy
The npm package @gapminder/percy-protractor receives a total of 2 weekly downloads. As such, @gapminder/percy-protractor popularity was classified as not popular.
We found that @gapminder/percy-protractor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.