cypress-drupal

1.1.0 • Public • Published

cypress-drupal

A collection of useful Cypress commands for Drupal.

Setup

Install this package via NPM:

npm install --dev cypress-drupal

Include this package into your Cypress command file:

// cypress/support/commands.js
import 'cypress-drupal';

Optional: Add the string for running drush commands to cypress.json:

{ ... "env": { "drupalDrushCmdLine": "/user/bin/drush %command" } }

Commands

Drupal Collection

drupalLogin( username , password )

Begins the user's authenticated session.

cy.drupalLogin('admin', 'admin')

drupalLogout()

Ends the user's authenticated session.

cy.drupalLogout()

drupalDrushCommand( command )

Issues a drush command.

The command can be passed as string or an array.

cy.drupalDrushCommand('status');
 
cy.drupalDrushCommand(['upwd', 'admin', 'admin']);

Package Sidebar

Install

npm i cypress-drupal

Weekly Downloads

17

Version

1.1.0

License

GPL-2.0

Unpacked Size

13.4 kB

Total Files

9

Last publish

Collaborators

  • epicflux