mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 04:18:01 +00:00
08ae39ae19
* new console * move npm ci to angular build * rel path for assets * local grpc copy * login policy, rm clear views, features rel path * lock Co-authored-by: Livio Amstutz <livio.a@gmail.com>
26 lines
830 B
TypeScript
26 lines
830 B
TypeScript
/*
|
|
namespace Cypress {
|
|
interface Chainable {
|
|
*/
|
|
/**
|
|
* Custom command that authenticates a user.
|
|
*
|
|
* @example cy.consolelogin('hodor', 'hodor1234')
|
|
*/
|
|
/* consolelogin(username: string, password: string): void
|
|
}
|
|
}
|
|
|
|
Cypress.Commands.add('consolelogin', { prevSubject: false }, (username: string, password: string) => {
|
|
|
|
window.sessionStorage.removeItem("zitadel:access_token")
|
|
cy.visit(Cypress.env('consoleUrl')).then(() => {
|
|
// fill the fields and push button
|
|
cy.get('#loginName').type(username, { log: false })
|
|
cy.get('#submit-button').click()
|
|
cy.get('#password').type(password, { log: false })
|
|
cy.get('#submit-button').click()
|
|
cy.location('pathname', {timeout: 5 * 1000}).should('eq', '/');
|
|
})
|
|
})
|
|
*/ |