import { cleanup, render, screen } from '@testing-library/react'
import { afterEach, describe, expect, it } from 'vitest'
import UnsavedChangesIndicator from '@/components/forms/UnsavedChangesIndicator'
afterEach(cleanup)
describe('UnsavedChangesIndicator', () => {
it('announces unsaved changes', () => {
render()
expect(screen.getByRole('status')).toHaveTextContent('تغییرات ذخیرهنشده دارید')
})
it('announces the clean state', () => {
render()
expect(screen.getByRole('status')).toHaveTextContent('تغییری برای ذخیره وجود ندارد')
})
})