14 lines
542 B
TypeScript
14 lines
542 B
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
test('#3 Product card should not resize or break styling on hover', async ({ page }) => {
|
|
await page.goto('https://uat.dailykart.net/');
|
|
const productCard = page.locator('.product-card').first(); // adjust selector
|
|
const initialSize = await productCard.boundingBox();
|
|
|
|
await productCard.hover();
|
|
const hoverSize = await productCard.boundingBox();
|
|
|
|
expect(hoverSize?.width).toBeCloseTo(initialSize?.width!, 5);
|
|
expect(hoverSize?.height).toBeCloseTo(initialSize?.height!, 5);
|
|
});
|