ManageIQ/manageiq-ui-classic

View on GitHub
cypress/support/commands/login.js

Summary

Maintainability
A
0 mins
Test Coverage
/* eslint-disable no-undef */

// user: String of username to log in with, default is admin.
// password: String of password to log in with, default is smartvm.
Cypress.Commands.add('login', (user = 'admin', password = 'smartvm') => {
  cy.visit('/');

  cy.get('#user_name').type(user);
  cy.get('#user_password').type(password);
  return cy.get('#login').click();
});