dailykart-testing/tests/b2b-image.spec.ts

12 lines
475 B
TypeScript

import { test, expect } from '@playwright/test';
test('#4 B2B page image should be properly sized and aligned', async ({ page }) => {
await page.goto('https://uat.dailykart.net/b2b');
const b2bImage = page.locator('.b2b-left-image'); // adjust selector
const imageSize = await b2bImage.boundingBox();
expect(imageSize?.width).toBeGreaterThan(300);
expect(imageSize?.height).toBeGreaterThan(200);
expect(imageSize?.x).toBeLessThan(500); // should be on left
});