Skip to content

Commit

Permalink
restore visibility algo, update test for ff
Browse files Browse the repository at this point in the history
  • Loading branch information
kuceb committed Jan 2, 2020
1 parent 5de7a11 commit de9c388
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/driver/src/dom/visibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,16 +359,16 @@ const elIsOutOfBoundsOfAncestorsOverflow = function ($el, $ancestor = $el.parent
// target el is out of bounds
if (
// target el is to the right of the ancestor's visible area
(elProps.fromElWindow.left >= (ancestorProps.width + ancestorProps.fromElWindow.left)) ||
(elProps.fromElWindow.left > (ancestorProps.width + ancestorProps.fromElWindow.left)) ||

// target el is to the left of the ancestor's visible area
((elProps.fromElWindow.left + elProps.width) <= ancestorProps.fromElWindow.left) ||
((elProps.fromElWindow.left + elProps.width) < ancestorProps.fromElWindow.left) ||

// target el is under the ancestor's visible area
(elProps.fromElWindow.top >= (ancestorProps.height + ancestorProps.fromElWindow.top)) ||
(elProps.fromElWindow.top > (ancestorProps.height + ancestorProps.fromElWindow.top)) ||

// target el is above the ancestor's visible area
((elProps.fromElWindow.top + elProps.height) <= ancestorProps.fromElWindow.top)
((elProps.fromElWindow.top + elProps.height) < ancestorProps.fromElWindow.top)
) {
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ describe('src/cypress/dom/visibility', () => {
<div style='width: 100px; height: 100px; overflow: hidden; position: relative; top: 700px; left: 700px;'>
<div style='position: absolute;'>
<div style='position: absolute;'>
<span style='position: absolute; left: -300px; top: 0px;'>out of bounds, parent position: absolute</span>
<span style='position: absolute; left: -350px; top: 0px;'>out of bounds, parent position: absolute</span>
</div>
</div>
</div>\
Expand Down

1 comment on commit de9c388

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on de9c388 Jan 2, 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/3.8.2/linux-x64/circle-issue-1096-firefox-support-de9c388b88e3e0cc7071dad3cd32533eabacd254-225732/cypress.zip
npm install https://cdn.cypress.io/beta/npm/3.8.2/circle-issue-1096-firefox-support-de9c388b88e3e0cc7071dad3cd32533eabacd254-225724/cypress.tgz

Please sign in to comment.