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

test('home page shows the product browse shell', async ({ page }) => {
  await page.goto('/');

  await expect(page.getByRole('heading', { name: 'Polymodel' })).toBeVisible();
  await expect(page.getByLabel('Browse shell')).toBeVisible();
  await expect(page.getByLabel('Browse results placeholder')).toBeVisible();
  await expect(page.getByText('Empty')).toBeVisible();
  await expect(page.getByRole('tab', { name: 'Recent' })).toBeVisible();
  await expect(page.getByRole('tab', { name: 'Hot' })).toBeVisible();
  await expect(page.getByRole('searchbox', { name: 'Search model projects' })).toBeVisible();
});

test('foundation route shows PM-38 primitives and reusable states', async ({ page }) => {
  await page.goto('/foundation');

  await expect(page.getByRole('heading', { name: 'Foundation', exact: true })).toBeVisible();
  await expect(page.getByText('Token and asset check')).toBeVisible();
  await expect(page.getByLabel('Foundation primitives')).toBeVisible();
  await expect(page.getByLabel('Reusable states')).toBeVisible();
  await expect(page.getByText('No projects yet')).toBeVisible();
  await expect(page.getByText('Feed unavailable')).toBeVisible();
});

test('home page no longer uses workflow roadmap demo copy as the product surface', async ({ page }) => {
  await page.goto('/');

  await expect(page.getByText('Thingiverse on atproto')).toHaveCount(0);
  await expect(page.getByText('Project lexicon')).toHaveCount(0);
  await expect(page.getByText('Jira and Confluence')).toHaveCount(0);
  await expect(page.getByText('Polytoken workflow')).toHaveCount(0);
  await expect(page.getByText('PM-38 foundation')).toHaveCount(0);
});
