Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbreiding committed Aug 18, 2020
1 parent 2441c84 commit f4a73eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/driver/cypress/fixtures/shadow-dom.html
Expand Up @@ -38,7 +38,7 @@
<div class="focusable" tabindex="1">
<cy-test-element innerClass="inside-focusable" content="Inside Focusable"></cy-test-element>
</div>
<cy-test-element innerClass="inside-non-visible" content="Not Visible" style="transform-style: preserve-3d; backface-visibility: hidden; transform: rotateY(180deg);"></cy-test-element>
<cy-test-element id="shadow-element-10" innerClass="inside-non-visible" content="Not Visible" style="display:block; transform-style: preserve-3d; backface-visibility: hidden; transform: rotateY(180deg);"></cy-test-element>

<script type="text/javascript">
if (window.customElements) {
Expand Down
6 changes: 5 additions & 1 deletion packages/driver/cypress/integration/e2e/visibility_spec.js
Expand Up @@ -36,9 +36,13 @@ describe('visibility', () => {
cy.get('.container-2').should('be.visible')
})

// TODO: move with tests added in this PR when it merges: https://github.com/cypress-io/cypress/pull/8166
it('non-visible ancestor causes element to not be visible', () => {
cy.visit('/fixtures/shadow-dom.html')
cy.get('.inside-non-visible', { includeShadowDom: true }).should('not.be.visible')
cy
.get('#shadow-element-10')
.find('.shadow-div', { includeShadowDom: true })
.should('not.be.visible')
})
})
})

0 comments on commit f4a73eb

Please sign in to comment.