/* @vitest-environment jsdom */ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { expect, test, vi } from 'vitest'; import { PlatformModalCloseButton } from './PlatformModalCloseButton'; test('renders profile modal close button with shared chrome', () => { render( {}} />); const button = screen.getByRole('button', { name: '关闭账户充值' }); expect(button.className).toContain('platform-modal-close'); expect(button.className).toContain('h-9'); expect(button.querySelector('svg')).toBeTruthy(); }); test('supports floating close button and custom icon', () => { render(