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

test('#5 Contact Us page: Email should clickable and Location should link to map', async ({ page }) => {
  await page.goto('https://uat.dailykart.net/contact', {
    waitUntil: 'load',
    timeout: 60000,
  });

  // ----------  Check Email Link ----------
  const emailLink = page.getByRole('link', { name: 'sales@dailykart.com' });
  await expect(emailLink).toHaveAttribute('href', 'mailto:sales@dailykart.com');

  // ----------  Check Location Link ----------
  const locationLink = page.getByText("Bengaluru");
  await expect(locationLink).toHaveAttribute('href', /google\.com\/maps|maps\.app\.goo\.gl/);
});
