-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for session in AppClient for tests #1165
Comments
Related: luckyframework/lucky_cli#492 |
Anyone can use the backdoor by setting the param Either way though, it'd be nice to allow setting the session is possible. Not sure how it'd work but should be doable! |
This is how I do it: client = ApiClient.new
response = client.exec(Some::Action)
client.headers("Cookie": response.headers["Set-Cookie"])
response = client.exec(Another::Action) I set response cookies from the previous request as the cookies for the next request. It's worked OK so far. |
I want to test so the browser actions are return right status codes if logged in and not logged in.
Now the app client only set authorization header, so it is only made to work for the API. I would like to have some support to auth a user for browser action as well.
Been trying to something like:
But it won't work as the cookie is set incorrectly.
While looking into the code, lucky have backdoor test for the user. But it seems to be only for LuckyFlow?
The text was updated successfully, but these errors were encountered: