Skip to content

Commit

Permalink
3.5.0 - fix clicking into iframe after interaction with AUT (#5520)
Browse files Browse the repository at this point in the history
* fix clicking into iframe after interaction with AUT

* add link to issue

* move test to click_spec
  • Loading branch information
kuceb authored and jennifer-shehane committed Oct 29, 2019
1 parent fdaca19 commit fc2dd21
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/driver/src/cy/mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const create = (state, keyboard, focused) => {

const elsToSendMouseleave = []

while (curParent && curParent !== commonAncestor) {
while (curParent && curParent.ownerDocument && curParent !== commonAncestor) {
elsToSendMouseleave.push(curParent)
curParent = curParent.parentNode
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1572,6 +1572,25 @@ describe('src/cy/commands/actions/click', () => {
})
})

describe('iframes', () => {
// https://github.com/cypress-io/cypress/issues/5449
it('can type into click inside iframe with hover state', () => {
cy.$$('<iframe src="/fixtures/dom.html"/>').prependTo(cy.$$('body'))

// type into aut
cy.get('input:first').click()

// type into iframe
cy.get('iframe:first')
.should((iframe) => expect(iframe.contents().find('#tabindex')).to.exist)
.then((iframe) => cy.wrap(iframe.contents().find('#tabindex'), { log: false }))
.click()

// type into aut again
cy.get('input:first').click()
})
})

describe('mousedown', () => {
it('gives focus after mousedown', (done) => {
const input = cy.$$('input:first')
Expand Down

4 comments on commit fc2dd21

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on fc2dd21 Oct 29, 2019

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/3.5.1/linux-x64/circle-develop-fc2dd21f8e79884674b9005b774a08cfd27aee76-177386/cypress.zip
npm install https://cdn.cypress.io/beta/npm/3.5.1/circle-develop-fc2dd21f8e79884674b9005b774a08cfd27aee76-177339/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on fc2dd21 Oct 29, 2019

Choose a reason for hiding this comment

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

Circle has built the darwin 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/3.5.1/darwin-x64/circle-develop-fc2dd21f8e79884674b9005b774a08cfd27aee76-177434/cypress.zip
npm install https://cdn.cypress.io/beta/npm/3.5.1/circle-develop-fc2dd21f8e79884674b9005b774a08cfd27aee76-177387/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on fc2dd21 Oct 29, 2019

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 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.

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.5.1/win32-x64/appveyor-develop-fc2dd21f8e79884674b9005b774a08cfd27aee76-28471702/cypress.zip
npm install https://cdn.cypress.io/beta/binary/3.5.1/win32-x64/appveyor-develop-fc2dd21f8e79884674b9005b774a08cfd27aee76-28471702/cypress.zip

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on fc2dd21 Oct 29, 2019

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.

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.5.1/win32-ia32/appveyor-develop-fc2dd21f8e79884674b9005b774a08cfd27aee76-28471702/cypress.zip
npm install https://cdn.cypress.io/beta/binary/3.5.1/win32-ia32/appveyor-develop-fc2dd21f8e79884674b9005b774a08cfd27aee76-28471702/cypress.zip

Please sign in to comment.