Automerge backed Markdown editor for the Atmosphere
Something went wrong. Try again.
123456789101112131415import { afterEach, describe, expect, it } from 'vitest'import { cleanup, render, screen } from '@testing-library/react'import { SaveStatusIndicator } from './SaveStatusIndicator'
describe('local save status', () => { afterEach(cleanup)
it('distinguishes a durable local save from network synchronization', () => { const view = render(<SaveStatusIndicator saveStatus={{ state: 'saved' }} isConcurrentTabOpen={false} />) expect(screen.getByRole('status')).toHaveTextContent('Saved locally') view.rerender(<SaveStatusIndicator saveStatus={{ state: 'saved' }} isConcurrentTabOpen={false} online={false} />) expect(screen.getByRole('status')).toHaveTextContent('Saved locally · Offline') })})