Visit beforeEach specs (#4836)

* move to visiting before each in traversals + querying specs

* bump eslint dev
This commit is contained in:
Brian Mann
2019-07-26 15:04:58 -04:00
committed by Ben Kucera
parent 48b2b5ad19
commit 86fc0d414f
3 changed files with 8 additions and 21 deletions
+1 -1
View File
@@ -67,7 +67,7 @@
"@cypress/bumpercar": "2.0.9",
"@cypress/commit-message-install": "2.7.0",
"@cypress/env-or-json-file": "2.0.0",
"@cypress/eslint-plugin-dev": "3.7.0",
"@cypress/eslint-plugin-dev": "3.7.1",
"@cypress/eslint-plugin-json": "3.2.1",
"@cypress/github-commit-status-check": "1.5.0",
"@cypress/npm-run-all": "4.0.5",
@@ -3,16 +3,8 @@ _ = Cypress._
Promise = Cypress.Promise
describe "src/cy/commands/querying", ->
before ->
cy
.visit("/fixtures/dom.html")
.then (win) ->
@body = win.document.body.outerHTML
beforeEach ->
doc = cy.state("document")
$(doc.body).empty().html(@body)
cy.visit("/fixtures/dom.html")
context "#focused", ->
it "returns the activeElement", ->
@@ -442,7 +434,8 @@ describe "src/cy/commands/querying", ->
cy.get("#list").then ($list) ->
expect($list.get(0)).to.eq list.get(0)
it.skip "FLAKY retries finding elements until something is found", ->
# NOTE: FLAKY in CI, need to investigate further
it.skip "retries finding elements until something is found", ->
missingEl = $("<div />", id: "missing-el")
## wait until we're ALMOST about to time out before
@@ -1373,6 +1366,8 @@ describe "src/cy/commands/querying", ->
it "returns invisible element when parent chain is visible", ->
cy.get("#form-header-region").contains("Back").should("not.be.visible")
# NOTE: not sure why this is skipped... last edit was 3 years ago...
# @bkucera maybe take a look at this
describe.skip "handles whitespace", ->
it "finds el with new lines", ->
btn = $("""
@@ -1661,4 +1656,4 @@ describe "src/cy/commands/querying", ->
cy.on "command:retry", _.after 2, ->
Cypress.stop()
cy.contains(/^does not contain asdfasdf at all$/)
cy.contains(/^does not contain asdfasdf at all$/)
@@ -5,16 +5,8 @@ dom = Cypress.dom
helpers = require("../../support/helpers")
describe "src/cy/commands/traversals", ->
before ->
cy
.visit("/fixtures/dom.html")
.then (win) ->
@body = win.document.body.outerHTML
beforeEach ->
doc = cy.state("document")
$(doc.body).empty().html(@body)
cy.visit("/fixtures/dom.html")
fns = [
{find: "*"}