-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test to check that styles are being applied to iframe document
- Loading branch information
1 parent
95df797
commit 996534c
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
describe('Iframed assertions', function () { | ||
beforeEach(function () { | ||
cy.viewport(1000, 600) | ||
cy.visit('/?iframed=true') | ||
}) | ||
|
||
const getIframeBody = () => { | ||
return cy | ||
.get('iframe[data-cy="iframe"]') | ||
.its('0.contentDocument.body') | ||
.should('not.be.empty') | ||
.then(cy.wrap) | ||
} | ||
|
||
it('Display the crop area with correct styles applied to the iframe', () => { | ||
getIframeBody() | ||
.find('.reactEasyCrop_CropArea') | ||
.should('exist') | ||
.should('have.css', 'color') | ||
.and('eq', 'rgba(0, 0, 0, 0.5)') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters