// @ts-ignore
import React from 'react'
import { render, screen } from '@testing-library/react'
import YongrenTabBarLayout from '../src/layouts/yongren-tab-bar-layout'
import { UserStatusBar } from '../src/components/ui/user-status-bar'
import { PageContainer } from '../src/components/ui/page-container'

describe('用人方小程序布局组件', () => {
  test('YongrenTabBarLayout应正确渲染', () => {
    render(
      <YongrenTabBarLayout activeKey="dashboard">
        <div>测试内容</div>
      </YongrenTabBarLayout>
    )

    // 检查底部导航标签
    expect(screen.getByText('首页')).toBeDefined()
    expect(screen.getByText('人才')).toBeDefined()
    expect(screen.getByText('订单')).toBeDefined()
    expect(screen.getByText('数据')).toBeDefined()
    expect(screen.getByText('设置')).toBeDefined()
  })

  test('UserStatusBar应正确渲染用户信息', () => {
    render(
      <UserStatusBar
        userName="测试用户"
        companyName="测试公司"
        notificationCount={3}
      />
    )

    expect(screen.getByText('测试用户')).toBeDefined()
    expect(screen.getByText('测试公司')).toBeDefined()
  })

  test('PageContainer应正确渲染子内容', () => {
    render(
      <PageContainer>
        <div>页面内容</div>
      </PageContainer>
    )

    expect(screen.getByText('页面内容')).toBeDefined()
  })
})