export function loginLocally() { cy.login( Cypress.env('username'), Cypress.env('password'), Cypress.env('dbguid'), Cypress.env('clientId')); } export function loginInteractively() { cy.visit('/'); enterText('Email or Username', Cypress.env('username')); cy.findAllByRole('button', { name: 'Next' }).click(); enterText('Password', Cypress.env('password')); enterText('Org PIN', Cypress.env('orgPin')); cy.findAllByRole('button', { name: 'Next' }).click(); } function enterText(name: string, value: string) { cy.findByLabelText(name).type(value); }