Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 83469

login with out the UI

$
0
0
Hi, I am trying to test an app with cypress and wondered if I could log in without the UI. The app has not been set up for rest. Just an ordinary app. Looking at local storage cookies, there is an XASESSIONID cookie. Currently I am trying cy.request('POST', '/p/login', { name: 'fred', password: 'passwd', }) I have set my login page to have a url of /login. And the name and password come from the system.user class which is inherited by the account class. And my person class is associated with account. But I think the code above assumes there is a login API waiting at /p/login which I guess there is not because it is a page. If I go via the UI in cypress, all works. So is what I am trying to do with cypress possible with a mendix app? I am not sure if fixtures are appropriate in this situation – basically setting the json I expect to get back and allow cypress to intercept the network return and replace it with my json. On other projects, the login API has return user data and a token for subsequent API calls. Sorry if this is a bit vague and disjointed, probably reflects my current confused thinking (!).

Viewing all articles
Browse latest Browse all 83469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>