Skip to content

epicflux/cypress-drupal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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

About

A collection of usefull Cypress commands for Drupal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published