driver: WIP trying to fix flaky CI tests

This commit is contained in:
Brian Mann
2017-09-16 21:42:04 -04:00
parent 9ab2094ad0
commit 8db69e9b86
@@ -478,25 +478,27 @@ describe "src/cy/commands/actions/scroll", ->
cy.get("#scroll-into-view-win-horizontal div").scrollIntoView().then ($el) ->
expect(@_body.get(0).scrollTop).to.eq(0)
## it'll scorll to the position, but this depends on
## it'll scroll to the position, but this depends on
## the size of the window??
expect(@_body.get(0).scrollLeft).to.not.eq(0)
cy.wrap(@_body).should("have.prop", "scrollLeft").and("not.eq", 0)
it "scrolls y axis of window to element", ->
expect(@_body.get(0).scrollTop).to.eq(0)
expect(@_body.get(0).scrollLeft).to.eq(0)
cy.get("#scroll-into-view-win-vertical div").scrollIntoView().then ($el) ->
expect(@_body.get(0).scrollTop).to.not.eq(0)
expect(@_body.get(0).scrollLeft).to.eq(200)
cy.wrap(@_body).should ($body) ->
expect(@_body).to.have.prop("scrollTop").and.not.eq(0)
expect(@_body).to.have.prop("scrollLeft").and.eq(200)
it "scrolls both axes of window to element", ->
expect(@_body.get(0).scrollTop).to.eq(0)
expect(@_body.get(0).scrollLeft).to.eq(0)
cy.get("#scroll-into-view-win-both div").scrollIntoView().then ($el) ->
expect(@_body.get(0).scrollTop).to.not.eq(0)
expect(@_body.get(0).scrollLeft).to.not.eq(0)
cy.wrap(@_body).should ($body) ->
expect(@_body).to.have.prop("scrollTop").and.not.eq(0)
expect(@_body).to.have.prop("scrollLeft").and.not.eq(0)
it "scrolls x axis of container to element", ->
expect(@scrollHoriz.get(0).scrollTop).to.eq(0)