Extract admin dashboard from ghabilee-frontend2 into a dedicated Next.js app for backoffice.ghabilee.ir (no SEO indexing / Clarity).
21 lines
694 B
TypeScript
21 lines
694 B
TypeScript
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(<UnsavedChangesIndicator isDirty />)
|
|
|
|
expect(screen.getByRole('status')).toHaveTextContent('تغییرات ذخیرهنشده دارید')
|
|
})
|
|
|
|
it('announces the clean state', () => {
|
|
render(<UnsavedChangesIndicator isDirty={false} />)
|
|
|
|
expect(screen.getByRole('status')).toHaveTextContent('تغییری برای ذخیره وجود ندارد')
|
|
})
|
|
})
|