import { test, expect } from '@playwright/test';

test('#2 Category names should be correctly capitalized and formatted', async ({ page }) => {
  await page.goto('https://uat.dailykart.net/');
  const categories = await page.locator('.sidebar .category-item').allTextContents(); // adjust selector

  for (const category of categories) {
    expect(category.trim()).toMatch(/^[A-Z][a-zA-Z\s]*$/); // Capitalized, not all caps
  }
});
