3.1.1 -> 3.1.2 breaks commands using element arrays
See original GitHub issueCurrent behavior:
click() fails with the following error related to https://github.com/kentcdodds/cypress-testing-library/pull/25
CypressError: cy.click() failed because it requires a DOM element.
The subject received was:
> [<button>, <button>]
The previous command that ran was:
> cy.then()
at Object.cypressErr (http://localhost:13370/__cypress/runner/cypress_runner.js:63008:11)
at Object.throwErr (http://localhost:13370/__cypress/runner/cypress_runner.js:62973:18)
at Object.throwErrByPath (http://localhost:13370/__cypress/runner/cypress_runner.js:63000:17)
at ensureElement (http://localhost:13370/__cypress/runner/cypress_runner.js:56011:21)
at validateType (http://localhost:13370/__cypress/runner/cypress_runner.js:55897:16)
at Object.ensureSubjectByType (http://localhost:13370/__cypress/runner/cypress_runner.js:55919:9)
at pushSubjectAndValidate (http://localhost:13370/__cypress/runner/cypress_runner.js:58778:15)
at Context.<anonymous> (http://localhost:13370/__cypress/runner/cypress_runner.js:58940:18)
at http://localhost:13370/__cypress/runner/cypress_runner.js:58649:33
at tryCatcher (http://localhost:13370/__cypress/runner/cypress_runner.js:124249:23)
at Promise._settlePromiseFromHandler (http://localhost:13370/__cypress/runner/cypress_runner.js:122267:31)
at Promise._settlePromise (http://localhost:13370/__cypress/runner/cypress_runner.js:122324:18)
at Promise._settlePromiseCtx (http://localhost:13370/__cypress/runner/cypress_runner.js:122361:10)
at Async._drainQueue (http://localhost:13370/__cypress/runner/cypress_runner.js:119178:12)
at Async._drainQueues (http://localhost:13370/__cypress/runner/cypress_runner.js:119183:10)
at Async.drainQueues (http://localhost:13370/__cypress/runner/cypress_runner.js:119057:14)
Desired behavior:
click() to work. (works on 3.1.1)
Steps to reproduce:
clone https://github.com/kentcdodds/cypress-testing-library
run npm setup
confirm test fails.
run npm install cypress@3.1.1
run npm run test:cypress:run
confirm test passes
Versions
cypress: 3.1.2
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Arrays - The Linux Documentation Project
Arrays. Newer versions of Bash support one-dimensional arrays. Array elements may be initialized with the variable[xx] notation. Alternatively, a script may ...
Read more >1.4 Arrays - Introduction to Programming in Java
Making an array in a Java program involves three distinct steps: Declare the array name. Create the array. Initialize the array values. We...
Read more >Array | Ruby API (v3.1)
An Array is an ordered, integer-indexed collection of objects, called elements. Any object may be an Array element. Array Indexes.
Read more >class Array - RDoc Documentation - doc.ruby-lang.org
An Array is an ordered, integer-indexed collection of objects, called elements. ... A positive index is an offset from the first element:.
Read more >Bash Reference Manual - GNU.org
The array variable BASH_REMATCH records which parts of the string matched the pattern. The element of BASH_REMATCH with index 0 contains the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Released in
3.1.3.@misoguy this is high priority for us. We’ll have a fix soon, but thank you!
the array-wrapping functionality of
cy.wrapwasn’t purposeful, so this wasn’t captured in a test. we are now adding it to a spec