Bypass UI Login using Cypress
09:04 16 Aug 2018

I am having problem bypassing UI login. My web application doesn't use API to authenticate users. There are no endpoints like /login. index.php will just open the login page and submit the form to login.

The application authenticate the user by auth($_REQUEST['username'], $_REQUEST['password_tx']);

This is what cypress printed after UI login submit.

enter image description here

I have no idea how to move on from here.

    // This doesn't work. The application doesn't get the user details from the body. It is in the submitted form. 
    cy.request({
        method: 'POST',
        url: '/index.php?p=sys001',
        form: true, 
        body: {
            username: 'user',
            password_tx: 'pass'
        }
    })
authentication cypress