import { render, screen } from '@testing-library/react'
import { describe, expect, it } from 'vitest'

import { AuthLayout } from './AuthLayout'

describe('AuthLayout', () => {
  it('renders children in the form area', () => {
    render(
      <AuthLayout>
        <div>login form</div>
      </AuthLayout>,
    )

    expect(screen.getByText('login form')).toBeInTheDocument()
  })

  it('displays the brand title', () => {
    render(
      <AuthLayout>
        <div>content</div>
      </AuthLayout>,
    )

    expect(screen.getByText('用户管理系统')).toBeInTheDocument()
  })

  it('displays brand description', () => {
    render(
      <AuthLayout>
        <div>content</div>
      </AuthLayout>,
    )

    expect(screen.getByText('企业级用户管理解决方案')).toBeInTheDocument()
  })

  it('displays feature list', () => {
    render(
      <AuthLayout>
        <div>content</div>
      </AuthLayout>,
    )

    expect(screen.getByText('支持多种登录方式')).toBeInTheDocument()
    expect(screen.getByText('基于角色的权限控制')).toBeInTheDocument()
    expect(screen.getByText('完整的审计日志')).toBeInTheDocument()
    expect(screen.getByText('安全的双因素认证')).toBeInTheDocument()
  })
})
