Improve stability of Playwright screenshot tests (#11983)

This commit is contained in:
Michael Telatynski 2023-12-04 11:02:48 +00:00 committed by GitHub
parent 74ea0d134e
commit e180ca841b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 71 additions and 80 deletions

View file

@ -66,14 +66,6 @@ limitations under the License.
--cpd-font-family-sans: $font-family;
}
@media only percy {
:root {
--percy-color-avatar: $username-variant2-color;
--percy-color-displayName: $username-variant1-color;
--percy-color-replyChain-border: $username-variant1-color;
}
}
@media (prefers-reduced-motion) {
:root {
--transition-short: 0;

View file

@ -14,15 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
/* Screenshot test specific CSS */
@media only percy {
/* Stick the default room avatar colour, so it doesn't cause a false diff on the screenshot */
.mx_BaseAvatar {
background-color: var(--percy-color-avatar) !important;
color: white !important;
}
}
button.mx_BaseAvatar {
/* <button> is a form element and by default it uses the user agent (browser) styling.
We want it to inherit the font-family and line-height from its parent.

View file

@ -64,11 +64,3 @@ limitations under the License.
--username-color: $username-variant8-color;
}
}
/* Percy screenshot test specific CSS */
@media only percy {
.mx_ReplyChain {
/* Override the colour in percy tests for screenshot consistency */
border-left-color: var(--percy-color-replyChain-border) !important;
}
}

View file

@ -34,10 +34,3 @@ limitations under the License.
font-size: var(--cpd-font-size-body-sm);
}
}
@media only percy {
.mx_DisambiguatedProfile_displayName {
/* Override the colour in percy tests for screenshot consistency */
color: var(--percy-color-displayName) !important;
}
}