import { test, expect } from '@playwright/test';
import { WebamboosHome } from '../../support/POMs/feature_one/example.page';

test.describe('Webamboos UI smoke', () => {
  test('homepage renders main UI blocks', async ({ page }) => {
    const home = new WebamboosHome(page);

    await test.step('Open homepage', async () => {
      await home.goto();
      await home.assertHeroVisible();
    });

    await test.step('Check nav links are visible', async () => {
      await expect(await home.getTopNavLink('Services')).toBeVisible();
      await expect(await home.getTopNavLink('Our work')).toBeVisible();
      await expect(await home.getTopNavLink('Contact us')).toBeVisible();
    });

    await test.step('Check stats section', async () => {
      await expect(home.getTeamMembersStat()).toBeVisible();
      await expect(home.getProjectsStat()).toBeVisible();
    });

    await test.step('Check "Our work" section heading', async () => {
      await expect(home.getOurWorkHeading()).toBeVisible();
    });

    await test.step('Check FAQ section heading', async () => {
      await expect(home.getFAQHeading()).toBeVisible();
    });
  });
});