Skip to content

Commit

Permalink
fix failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
sainthkh committed Nov 16, 2021
1 parent beee58f commit ebf043b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/driver/src/cy/ensures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const VALID_POSITIONS = 'topLeft top topRight left center right bottomLeft botto
// they may need to work with both element arrays, or specific items
// such as a single element, a single document, or single window

let returnFalse = () => false

export const create = (state, expect) => {
// TODO: we should probably normalize all subjects
// into an array and loop through each and verify
Expand Down Expand Up @@ -152,7 +154,9 @@ export const create = (state, expect) => {
}

const runVisibilityCheck = (subject, onFail, method) => {
const visibleSubjects = subject.filter(() => !method(this, 'isVisible()', { checkOpacity: false }))
const visibleSubjects = subject.filter(function () {
return !method(this, 'isVisible()', { checkOpacity: false })
})

if (subject.length !== visibleSubjects.length) {
const cmd = state('current').get('name')
Expand Down Expand Up @@ -240,7 +244,7 @@ export const create = (state, expect) => {
}

const ensureExistence = (subject) => {
const returnFalse = () => {
returnFalse = () => {
cleanup()

return false
Expand Down

0 comments on commit ebf043b

Please sign in to comment.