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

test('#12 Verify consistent text color in Contact Info section', async ({ page }) => {
  await page.goto('https://linkstalent.com/'); 

  // Scroll to footer
  await page.locator('footer').scrollIntoViewIfNeeded();

  // Use stable, specific locators
  const inquiry = page.locator('a.phone');
  const email = page.locator('a.footer-email');
  const location = page.locator('footer >> a:has-text("Clock Tower Office Building")');

  // Get computed color styles
  const inquiryColor = await inquiry.evaluate(el => getComputedStyle(el).color);
  const emailColor = await email.evaluate(el => getComputedStyle(el).color);
  const locationColor = await location.evaluate(el => getComputedStyle(el).color);

  // Log for debugging
  console.log(' Inquiry:', inquiryColor);
  console.log(' Email:', emailColor);
  console.log(' Location:', locationColor);

  // Assertion
  expect(emailColor).toBe(inquiryColor);
  expect(locationColor).toBe(inquiryColor);
});
