Skip to content

Commit

Permalink
fix: Avoid looking up remote jquery instance if subject is not an ele…
Browse files Browse the repository at this point in the history
…ment (#8300)
  • Loading branch information
chrisbreiding committed Aug 17, 2020
1 parent 2f835f7 commit 093f3e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/driver/src/cy/jquery.js
Expand Up @@ -14,14 +14,16 @@ const create = function (state) {

return {
getRemotejQueryInstance (subject) {
const remoteJQuery = jquery()

// we make assumptions that you cannot have
// an array of mixed types, so we only look at
// the first item (if there's an array)
const firstSubject = $utils.unwrapFirst(subject)

if ($dom.isElement(firstSubject) && remoteJQueryisNotSameAsGlobal(remoteJQuery)) {
if (!$dom.isElement(firstSubject)) return

const remoteJQuery = jquery()

if (remoteJQueryisNotSameAsGlobal(remoteJQuery)) {
const remoteSubject = remoteJQuery(subject)

return remoteSubject
Expand Down

2 comments on commit 093f3e7

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 093f3e7 Aug 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/linux-x64/circle-develop-093f3e7505096e24b2d49d53dbf2e9b3a31dd6fe-424210/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/circle-develop-093f3e7505096e24b2d49d53dbf2e9b3a31dd6fe-424185/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 093f3e7 Aug 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 ia32 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

Instructions are included below, depending on the shell you are using.

In Command Prompt (cmd.exe):

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/win32-ia32/appveyor-develop-093f3e7505096e24b2d49d53dbf2e9b3a31dd6fe-34702071/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/appveyor-develop-093f3e7505096e24b2d49d53dbf2e9b3a31dd6fe-34702071/cypress.tgz

In PowerShell:

$env:CYPRESS_INSTALL_BINARY = https://cdn.cypress.io/beta/binary/5.0.0/win32-ia32/appveyor-develop-093f3e7505096e24b2d49d53dbf2e9b3a31dd6fe-34702071/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/appveyor-develop-093f3e7505096e24b2d49d53dbf2e9b3a31dd6fe-34702071/cypress.tgz

In Git Bash:

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/win32-ia32/appveyor-develop-093f3e7505096e24b2d49d53dbf2e9b3a31dd6fe-34702071/cypress.zip
npm install https://cdn.cypress.io/beta/npm/5.0.0/appveyor-develop-093f3e7505096e24b2d49d53dbf2e9b3a31dd6fe-34702071/cypress.tgz

Using cross-env:

If the above commands do not work for you, you can also try using cross-env:

npm i -g cross-env
cross-env CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/5.0.0/win32-ia32/appveyor-develop-093f3e7505096e24b2d49d53dbf2e9b3a31dd6fe-34702071/cypress.zip npm install https://cdn.cypress.io/beta/npm/5.0.0/appveyor-develop-093f3e7505096e24b2d49d53dbf2e9b3a31dd6fe-34702071/cypress.tgz

Please sign in to comment.