import { render, screen } from '@testing-library/react'
import { NextIntlClientProvider } from 'next-intl'
import { describe, expect, test } from 'vitest'
import BuilderClientPage from './BuilderClientPage'
import messages from '../messages/en.json'

function Wrapper({ children }: { children: React.ReactNode }) {
  return (
    <NextIntlClientProvider messages={messages} locale="en">
      {children}
    </NextIntlClientProvider>
  )
}

describe('BuilderClientPage - SEO/Analytics helptexts', () => {
  test('renders helpful hints under SEO/Analytics/OG inputs', () => {
    render(
      <Wrapper>
        <BuilderClientPage />
      </Wrapper>
    )

    expect(screen.getByText(/Shown in browser title and social previews/i)).toBeInTheDocument()
    expect(screen.getByText(/Used by search engines and OG description/i)).toBeInTheDocument()
    expect(screen.getByText(/Absolute URL recommended/i)).toBeInTheDocument()
    expect(screen.getByText(/Format: G-XXXXXXXXXX/i)).toBeInTheDocument()
    expect(screen.getByText(/Numeric Page ID/i)).toBeInTheDocument()
  })
})
