@netsells/cypress-commands
Common CypressIO commands in Netsells projects
Last updated a year ago by sam.boylett .
ISC · Original npm · Tarball · package.json
$ cnpm install @netsells/cypress-commands 
SYNC missed versions from official npm registry.

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');

Current Tags

  • 2.0.3                                ...           latest (a year ago)

4 Versions

  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |