Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: absolute positioning element blackouts in cy.screenshot (#22756)
* add regression tests * attempt to fix screenshot blacks basing blackouted element around container instead of body dimensions * move blackout test to screenshot viewport suite and update snapshot * add github issue to test
- Loading branch information
1 parent
782dfb7
commit e16820b
Showing
5 changed files
with
130 additions
and
16 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
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
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
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
47 changes: 47 additions & 0 deletions
47
system-tests/projects/e2e/cypress/fixtures/screenshot-blackout.html
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,47 @@ | ||
<html> | ||
<head> | ||
<style> | ||
.centered-container { | ||
position: relative; | ||
height: 400px; | ||
width: 400px; | ||
max-width: 100%; | ||
margin: 0 auto; | ||
text-align: center; | ||
vertical-align: middle; | ||
} | ||
.third-container { | ||
color: white; | ||
} | ||
.grey { | ||
background-color: grey; | ||
} | ||
.blue { | ||
background-color: blue; | ||
position: absolute; | ||
top: 0; | ||
right: 0%; | ||
} | ||
.red { | ||
background-color: red; | ||
position: absolute; | ||
top: 0; | ||
right: 33.33%; | ||
} | ||
.purple { | ||
background-color: purple; | ||
position: absolute; | ||
top: 0; | ||
right: 66.66%; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Screenshot Blackout Test Absolute Positioning</h1> | ||
<div class="centered-container grey"> | ||
<div class="third-container blue"> Blue Container</div> | ||
<div class="third-container red"> Red Container</div> | ||
<div class="third-container purple"> Purple Container</div> | ||
</div> | ||
</body> | ||
</html> |
e16820b
There was a problem hiding this comment.
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.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
e16820b
There was a problem hiding this comment.
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 arm64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
e16820b
There was a problem hiding this comment.
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 arm64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
e16820b
There was a problem hiding this comment.
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.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
e16820b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
win32 x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally: