mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-03 21:40:28 -05:00
driver: WIP trying to fix flaky CI tests
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user