Class mozilla.components.browser.menu.view.StickyHeaderLinearLayoutManagerTest
Tests
Test |
Duration |
Result |
GIVEN a default layout menu WHEN getY is called THEN it returns 0 as the translation to be set for the sticky item |
0.001s |
passed |
GIVEN a reverseLayout menu WHEN getY is called THEN it returns the translation needed to push the sticky item to the top |
0.001s |
passed |
GIVEN items above the sticky item shown at top but ofsetted offscreen WHEN shouldStickyItemBeShownForCurrentPosition is called THEN it returns true |
0.076s |
passed |
GIVEN items below the sticky item are scrolled upwards offscreen WHEN shouldStickyItemBeShownForCurrentPosition is called THEN it returns true |
0.002s |
passed |
GIVEN scrollToIndicatedPositionWithOffset WHEN called with a position bigger than stickyItemPosition THEN will scroll to before that |
0s |
passed |
GIVEN scrollToIndicatedPositionWithOffset WHEN called with a position equal to stickyItemPosition THEN will scroll to before that |
0.001s |
passed |
GIVEN scrollToIndicatedPositionWithOffset WHEN called with a position smaller than stickyItemPosition THEN will scroll to that position |
0s |
passed |
GIVEN stickyItemPosition not set WHEN shouldStickyItemBeShownForCurrentPosition is called THEN it returns false |
0.001s |
passed |
GIVEN the sticky item is shown below the top of the list WHEN shouldStickyItemBeShownForCurrentPosition is called THEN it returns false |
0.001s |
passed |
GIVEN the top item is the sticky one WHEN shouldStickyItemBeShownForCurrentPosition is called THEN it returns true |
0.002s |
passed |