fix: preserve reusable contact linework ratio
This commit is contained in:
@@ -385,9 +385,12 @@ test("mobile contact card matches the 402px reference geometry", async ({
|
||||
|
||||
const media = clone.querySelector(".contact-block__media");
|
||||
const content = clone.querySelector(".contact-block__content");
|
||||
const linework = clone.querySelector(".contact-block__linework");
|
||||
const lineworkBox = linework.getBoundingClientRect();
|
||||
const styles = {
|
||||
borderRadius: getComputedStyle(clone).borderRadius,
|
||||
contentPaddingLeft: getComputedStyle(content).paddingLeft,
|
||||
lineworkRatio: lineworkBox.width / lineworkBox.height,
|
||||
maskImage: getComputedStyle(media).maskImage,
|
||||
overlay: getComputedStyle(media, "::after").backgroundImage,
|
||||
};
|
||||
@@ -398,6 +401,7 @@ test("mobile contact card matches the 402px reference geometry", async ({
|
||||
|
||||
expect(reusableStyles.borderRadius).toBe("12px 12px 0px 0px");
|
||||
expect(reusableStyles.contentPaddingLeft).toBe("24px");
|
||||
expectNear(reusableStyles.lineworkRatio, 628 / 282, 0.03);
|
||||
expect(reusableStyles.maskImage).toContain("linear-gradient");
|
||||
expect(reusableStyles.overlay).toBe("none");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user