fix: match mobile pull quote design
This commit is contained in:
@@ -95,6 +95,28 @@ test("mobile hero vector covers the 767px composition", async ({ page }) => {
|
||||
expect(vector.x + vector.width).toBeGreaterThanOrEqual(760);
|
||||
});
|
||||
|
||||
test("mobile pull quote matches the reference scale", async ({ page }) => {
|
||||
await page.goto(homepage);
|
||||
|
||||
const quote = await getBox(page.locator(".pull-quote"));
|
||||
const text = await getBox(page.locator(".pull-quote__text"));
|
||||
const vectorImage = page.locator(".pull-quote__vector img");
|
||||
const vector = await getBox(vectorImage);
|
||||
|
||||
expectNear(quote.height, 361, 6);
|
||||
expectNear(text.x - quote.x, 32, 3);
|
||||
expect(text.width).toBeGreaterThanOrEqual(330);
|
||||
expectNear(text.height, 216, 6);
|
||||
expectNear(
|
||||
text.y + text.height / 2,
|
||||
quote.y + (quote.height - 12) / 2,
|
||||
8,
|
||||
);
|
||||
expect(vector.width).toBeGreaterThanOrEqual(470);
|
||||
expect(vector.height).toBeGreaterThan(quote.height);
|
||||
await expect(vectorImage).toHaveCSS("object-position", "3% 42%");
|
||||
});
|
||||
|
||||
test("mobile recent posts exposes previous and next controls", async ({
|
||||
page,
|
||||
}) => {
|
||||
|
||||
Reference in New Issue
Block a user