utils.js (706B)
1 const login = () => { 2 cy.get('form#login_form').within(() => { 3 // Set homeserverurl 4 const homeserver_url = "http://localhost:8448"; 5 cy.get('input#homeserver').type(homeserver_url); 6 cy.get('input#homeserver').should('have.value', homeserver_url); 7 8 // Set username 9 const username = "@carl:example.com"; 10 cy.get('input#username').type(username); 11 cy.get('input#username').should('have.value', username); 12 13 // Set password 14 const password = "12345"; 15 cy.get('input#password').type(username); 16 cy.get('input#password').should('have.value', username); 17 }); 18 cy.get('form#login_form').submit(); 19 } 20 21 export {login}