Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@netsells/cypress-commands

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netsells/cypress-commands

Common CypressIO commands in Netsells projects

latest
npmnpm
Version
2.0.3
Version published
Maintainers
6
Created
Source

Cypress Commands

Build Status

Useful commands for testing accessibility issues in Cypress

Installation

yarn add --dev @netsells/cypress-commands

Setup

In support/commands.js:

const { loadAccessibilityCommands } = require('@netsells/cypress-commands');

loadAccessibilityCommands();

In plugins/index.js:

const { loadAccessibilityPlugins } = require('@netsells/cypress-commands');

module.exports = (on, config) => {
	loadAccessibilityPlugins(on, config);
}

Usage

checkAccessibility

Assert a pages HTML is accessible using the PayPal AATT

// visit a page
cy.visit('/page');
// assert the page has finished loading
cy.contains('Page Title').should('be.visible');
// assert its accessibility
cy.checkAccessibility();

field

Get a field by via its label

cy.field('Password', field => field.type('Password'));

createAccessiblityTests

Use this to easily generate lots of accessibility tests for multiple URLs.

import { createAccessiblityTests } from '@netsells/cypress-commands';

createAccessiblityTests('/', 'gift-cards', 'login');

FAQs

Package last updated on 02 Apr 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