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
feat: autoregister commands & add enableAutoLogin setup #101
Conversation
33d7a6d
to
5b226ed
Compare
5b226ed
to
d784580
Compare
packages/cypress-commands/src/commands/fillAndSubmitLoginForm.js
Outdated
Show resolved
Hide resolved
d784580
to
ac373b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be very handy, great work! I've left a few comments in the code, most relate to the same thing so I'll also try to explain my general ideas below:
- In my opinion, if possible, we should only have one
login
command and ideally this should be doing what is nowloginBasicAuth
, since that is independent of the app-platform login modal. - And besides that
login
command we should have theenableAutoLogin
setup, which callscy.login()
in thebefore
hook and in thebeforeEach
it preserves the cookie and localStorage item. Probably I would prefer a slightly different name, i.e.enablePersistedSession
or sth.
packages/cypress-commands/src/commands/fillAndSubmitLoginForm.js
Outdated
Show resolved
Hide resolved
@HendrikThePendric I've updated the login command, the setup file and the deprecation warning |
d85e954
to
60cd25b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the points we discussed. Great work!
09bdb04
to
0bbb8e9
Compare
🎉 This PR is included in version 3.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes CLI-14
enableAutoLogin
setup helperfeat(login): add command to fill login form
) is a bit questionable