-
Notifications
You must be signed in to change notification settings - Fork 16
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 unit tests for History View user script and fix reloading history #3855
Conversation
@jotaemepereira please note that HistoryViewDataProvider is not tested yet in this change. I'll provide tests for that class later. Thanks! |
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.
@ayoy I’ve tested the feature and the unit tests looks good 👍🏼 .
@@ -27,7 +27,7 @@ extension Array { | |||
} | |||
|
|||
func chunk(with limit: Int, offset: Int) -> [Element] { | |||
guard !isEmpty, offset < count else { | |||
guard !isEmpty, limit >= 0, offset >= 0, offset < count else { |
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.
❓ Did we have calls to the chunk
method with negative values on limit
and offset
, is it something we should be worried about?
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.
Only if accidentally called with a negative value, which shouldn't be the case, but this function is ultimately called from JS, so better safe than sorry :)
Task/Issue URL: https://app.asana.com/0/72649045549333/1209365356928711
Description:
This change adds missing unit tests, adds event handling to History View (together with 2 pixels) and
fixes reloading history.
Steps to test this PR:
historyView
feature flag.duck://history
).Definition of Done:
Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation