-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix ajax search and maxOptions. Add initial Cypress tests #2710
Conversation
@NicolasCARPi This is still a WIP. I'll send it your way to review once I'm done. |
@@ -1021,15 +1024,6 @@ | |||
}); | |||
}); | |||
|
|||
this.fetchData(function () { |
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.
removing this duplicate block
@NicolasCARPi I'm still working on fixes for #2671, but there's no reason those should hold up this fix. Let me know your thoughts on dropping the |
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.
I think it would be best to have a test case in the tests
folder, with a fake ajax call (just a function returning stuff), so we can actually assess if the fix works and have different test case (you said the bug wasn't found before because it was only triggered in certain conditions).
We don't have automated tests (yet), but I believe it's important to add test cases when possible.
@NicolasCARPi Have you made any progress on implementing Cypress? I also have Cypress experience and might try to tackle some of the initial groundwork if you haven't already. |
Nope, I didn't, so feel free to lay the groundwork ;) |
…ore loading next page. Pass correct searchTerm. Trigger fetched event. Change first page to 1.
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.
I think it's great to finally have some end to end testing! This should be merged and a new beta version must be released ASAP :)
@NicolasCARPi Yes it's about time. I'm excited to add more. Going to make it so much easier to add new features and fix bugs. Just need to update the changelog and I think we can prep for a release. I'd like to also look into it to see if there's a way to automatically create a nuget release at the same time as well. |
sure, see: https://github.com/marketplace/actions/publish-nuget Keep in mind that github actions have issues right now ;) https://www.githubstatus.com/ |
more
argument as an additional argument to the callback functionsource.load
method in favor of simply usingsource.data
.page
is now passed intosource.data
as the 2nd argument (just likesource.search
). If you want static data on init (and don't want to call your AJAX function), you can just checkpage === 0
).Demo: https://plnkr.co/edit/1j2mceV5ewKIxp9n