Add a command to log in a user in by their username via drush uli.

Created on 22 May 2025, about 1 month ago

Problem/Motivation

Some sites use a passwordless login. While that should be tested, we should also be able to bypass that to simply log in. Adding a drush uli method to login would solve that.

/**
 * Logs a user in by their username via drush uli.
 */
Cypress.Commands.add('loginUserByUsername', (username) => {
  cy.drush('user-login', [username], { uri: Cypress.env('baseUrl') })
    .its('stdout')
    .then((url) => {
      cy.visit(url);
    });
});

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Component

Commands

Created by

πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024