import { render, screen } from '@testing-library/react';
import PricingPage from '../src/pages/marketing/PricingPage';
import { expect, test, describe } from 'bun:test';

describe('PricingPage', () => {
  test('Self-hosted FAQ answer updated to mention open source with GitHub links', () => {
    render(<PricingPage />);
    const selfHostedText = screen.getByText(/self-hosted/i);
    expect(selfHostedText).toBeDefined();

    const openSourceText = screen.getByText(/open source/i);
    expect(openSourceText).toBeDefined();

    const gatehouseUiLink = screen.getByRole('link', { name: 'gatehouse-ui' });
    expect(gatehouseUiLink).toBeDefined();
    expect(gatehouseUiLink).toHaveAttribute('href', 'https://github.com/gatehouse/gatehouse-ui');

    const gatehouseApiLink = screen.getByRole('link', { name: 'gatehouse-api' });
    expect(gatehouseApiLink).toBeDefined();
    expect(gatehouseApiLink).toHaveAttribute('href', 'https://github.com/gatehouse/gatehouse-api');
  });
});