Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing autoLogin of supportObject #3290

Merged
merged 1 commit into from Apr 12, 2022

Conversation

kobenguyent
Copy link
Collaborator

Motivation/Description of the PR

Type of change

  • 馃悰 Bug fix

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@Arhell Arhell requested a review from DavertMik April 12, 2022 06:22
@kobenguyent kobenguyent merged commit 33f2f12 into 3.x Apr 12, 2022
@callistino
Copy link

callistino commented Apr 12, 2022

I know is already merged but wouldn't it be better if we looped through plugins the same way it does for helpers and includes in order to include all defined plugins and not just autologin? What about if I use a custom login plugin?

@Arhell Arhell deleted the fix-3105-autologin-ts-typings branch April 12, 2022 11:49
@DavertMik
Copy link
Contributor

@callistino good idea. Do you know how to implement this in the right way?
Pull request is very welcome!

@callistino
Copy link

@callistino good idea. Do you know how to implement this in the right way? Pull request is very welcome!

I will take a stab at it sure.

@callistino
Copy link

@DavertMik I finally had time to work on this solution and it's not something we can do on the fly for plugins unfortunately. Some plugins have a registerGlobal config property and some don't but we have no way to know that inside the definitions generator. Others like autoLogin, inject themselves into the SupportObject at runtime. I think the best solution would be to provide typings for each plugin instead of trying to generate. The solution on this PR is good enough but it still doesn't provide typings for global plugins like tryTo for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to use the autoLogin() plugin with TypeScript testing
4 participants