import React from 'react'
import { render } from '@testing-library/react-native'
import PaginationLoader from './PaginationLoader'
describe('PaginationLoader Component', () => {
describe('Basic Rendering', () => {
it('should render ActivityIndicator', () => {
const { UNSAFE_root } = render()
expect(UNSAFE_root).toBeTruthy()
})
it('should render with optional text', () => {
const { getByText } = render()
expect(getByText('加载更多...')).toBeTruthy()
})
it('should render without text when not provided', () => {
const { queryByText } = render()
expect(queryByText(/./)).toBeNull()
})
})
describe('Theme Support', () => {
it('should use default color', () => {
const { UNSAFE_root } = render()
expect(UNSAFE_root).toBeTruthy()
})
it('should accept custom color', () => {
const { UNSAFE_root } = render()
expect(UNSAFE_root).toBeTruthy()
})
})
describe('Props', () => {
it('should accept testID prop', () => {
const { getByTestId } = render()
expect(getByTestId('pagination-loader')).toBeTruthy()
})
})
})