Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cypress: Status bar scrolling: Allow multiple clicks, wait for anim
Better to keep clicking until the indicator is visible to make sure we have arrived to the edge and better to wait for animation to end before further checks or clicks. With this we don't need to check twice the zoomin visibility. Before this commit I have noticed that - we were not waiting for the animation to end -> so sometimes the test would fail - and that the test was stopping the clicking even if there was more to click until the indicator disappears This is easy to test if we update the px step from 300 to 30 in Util.ScrollableBar.ts, for example: modified browser/src/control/jsdialog/Util.ScrollableBar.ts @@ -24,16 +24,16 @@ function createScrollButtons(parent: Element, scrollable: Element) { const right = L.DomUtil.create('div', 'ui-scroll-right', parent); JSDialog.AddOnClick(left, () => { - const scroll = $(scrollable).scrollLeft() - 300; - $(scrollable).animate({ scrollLeft: scroll }, 300); + const scroll = $(scrollable).scrollLeft() - 30; + $(scrollable).animate({ scrollLeft: scroll }, 30); setTimeout(function () { JSDialog.RefreshScrollables(); }, 350); }); JSDialog.AddOnClick(right, () => { - const scroll = $(scrollable).scrollLeft() + 300; - $(scrollable).animate({ scrollLeft: scroll }, 300); + const scroll = $(scrollable).scrollLeft() + 30; + $(scrollable).animate({ scrollLeft: scroll }, 30); Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com> Change-Id: I10b0486d58753d6b8ed714629fa171caafa557af
- Loading branch information