-
Notifications
You must be signed in to change notification settings - Fork 16
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