import { describe, it, expect } from 'vitest';
import { blockActions } from './block-actions';

describe('blockActions', () => {
  it('a Concept can be resumed or cancelled', () => {
    expect(blockActions({ tag: 'Concept', stepIndex: 1, stepCount: 3 })).toEqual([
      'resume',
      'cancel',
    ]);
  });

  it('an in-behandeling aanvraag only exposes its documents', () => {
    expect(blockActions({ tag: 'InBehandeling', referentie: 'BIG-1', manual: true })).toEqual([
      'viewDocuments',
    ]);
  });

  it('resolved aanvragen have no actions', () => {
    expect(blockActions({ tag: 'Goedgekeurd', referentie: 'BIG-1' })).toEqual([]);
    expect(blockActions({ tag: 'Afgewezen', referentie: 'BIG-1', reden: 'x' })).toEqual([]);
  });
});
