mirror of
https://github.com/langgenius/dify.git
synced 2026-04-10 11:37:11 +08:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
23 lines
751 B
TypeScript
23 lines
751 B
TypeScript
import SyncingDataModal from '../syncing-data-modal'
|
|
import { renderWorkflowComponent } from './workflow-test-env'
|
|
|
|
describe('SyncingDataModal', () => {
|
|
it('should not render when workflow draft syncing is disabled', () => {
|
|
const { container } = renderWorkflowComponent(<SyncingDataModal />)
|
|
|
|
expect(container).toBeEmptyDOMElement()
|
|
})
|
|
|
|
it('should render the fullscreen overlay when workflow draft syncing is enabled', () => {
|
|
const { container } = renderWorkflowComponent(<SyncingDataModal />, {
|
|
initialStoreState: {
|
|
isSyncingWorkflowDraft: true,
|
|
},
|
|
})
|
|
|
|
const overlay = container.firstElementChild
|
|
expect(overlay).toHaveClass('absolute', 'inset-0')
|
|
expect(overlay).toHaveClass('z-9999')
|
|
})
|
|
})
|