Skip to content
Snippets Groups Projects
test-controller.interfaces.ts 3.11 KiB
Newer Older
  • Learn to ignore specific revisions
  • // used everywhere
    export interface TaggedString {
        tag: string;
        value: string;
    
    }
    
    export interface UnitResponseData {
    
    mechtelm's avatar
    mechtelm committed
        unitDbKey: string;
    
        response: string;
        responseType: string;
    }
    
    export interface UnitRestorePointData {
    
    mechtelm's avatar
    mechtelm committed
        unitDbKey: string;
    
    // testcontroller restrictions +++++++++++++++++++++++++++++++++++
    
    export interface StartLockData {
    
    mechtelm's avatar
    mechtelm committed
        title: string;
    
    mechtelm's avatar
    mechtelm committed
        prompt: string;
    
    mechtelm's avatar
    mechtelm committed
        codes: CodeInputData[];
    
    export interface CodeInputData {
    
    mechtelm's avatar
    mechtelm committed
        testletId: string;
    
        prompt: string;
        code: string;
        value: string;
    }
    
    // for backend ++++++++++++++++++++++++++++++++++++++++++++++++++++++
    export interface KeyValuePair {
        [K: string]: string;
    }
    
    
    export interface UnitData {
        xml: string;
        restorepoint: string;
    
    mechtelm's avatar
    mechtelm committed
        laststate: KeyValuePair[];
    
    mechtelm's avatar
    mechtelm committed
    export interface TestData {
    
      xml: string;
    
    mechtelm's avatar
    mechtelm committed
      mode: string;
    
      laststate: KeyValuePair[];
    }
    
    
    export enum TestStatus {
      RUNNING = "RUNNING",
      WAITING_LOAD_COMPLETE = "WAITING_LOAD_COMPLETE",
      TERMINATED = "TERMINATED",
      PAUSED = "PAUSED",
      WAITING_LOAD_START = "WAITING_LOAD_START",
      ERROR = "ERROR"
    }
    
    export interface UnitMenuButtonData {
      sequenceId: number;
      label: string;
      isCurrent: boolean;
    
      isDisabled: boolean;
    
      testletLabel: string;
      testletMarker: string
    
    // for testcontroller service ++++++++++++++++++++++++++++++++++++++++
    export interface BookletStateEntry {
        bookletDbId: number;
        timestamp: number;
        entryKey: string;
        entry: string;
    
    export interface BookletLogData {
        bookletDbId: number;
        timestamp: number;
        entry: string;
    
    export interface UnitLogData {
        bookletDbId: number;
        unitDbKey: string;
        timestamp: number;
        entry: string;
    
    mechtelm's avatar
    mechtelm committed
    export enum LastStateKey {
    
    mechtelm's avatar
    mechtelm committed
        LASTUNIT = 'LASTUNIT',
    
        MAXTIMELEFT = 'MAXTIMELEFT',
        PRESENTATIONCOMPLETE = 'PRESENTATIONCOMPLETE'
    
    mechtelm's avatar
    mechtelm committed
    }
    
    export enum LogEntryKey {
    
    mechtelm's avatar
    mechtelm committed
        UNITENTER = 'UNITENTER',
    
    mechtelm's avatar
    mechtelm committed
        UNITTRYLEAVE = 'UNITTRYLEAVE',
    
    mechtelm's avatar
    mechtelm committed
        BOOKLETLOADSTART = 'BOOKLETLOADSTART',
        BOOKLETLOADCOMPLETE = 'BOOKLETLOADCOMPLETE',
        PAGENAVIGATIONSTART = 'PAGENAVIGATIONSTART',
        PAGENAVIGATIONCOMPLETE = 'PAGENAVIGATIONCOMPLETE',
        PRESENTATIONCOMPLETE = 'PRESENTATIONCOMPLETE',
        RESPONSESCOMPLETE = 'RESPONSESCOMPLETE'
    }
    
    
    mechtelm's avatar
    mechtelm committed
    export enum MaxTimerDataType {
    
    mechtelm's avatar
    mechtelm committed
        STARTED = 'STARTED',
    
    mechtelm's avatar
    mechtelm committed
        STEP = 'STEP',
        CANCELLED = 'CANCELLED',
    
    mechtelm's avatar
    mechtelm committed
        ENDED = 'ENDED'
    
    mechtelm's avatar
    mechtelm committed
    }
    
    
    export interface UnitNaviButtonData {
      sequenceId: number;
      disabled: boolean;
    
      shortLabel: string;
      longLabel: string;
      testletLabel: string;
    
      isCurrent: boolean;
    }
    
    
    // for unithost ++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    export interface PageData {
        index: number;
        id: string;
    
    mechtelm's avatar
    mechtelm committed
        type: '#next' | '#previous' | '#goto';
    
        disabled: boolean;
    }
    
    mechtelm's avatar
    mechtelm committed
    
    export interface ReviewDialogData {
      loginname: string;
      bookletname: string;
      unitDbKey: string;
      unitTitle: string;
    }
    
    mechtelm's avatar
    mechtelm committed
    
    export enum NoUnitFlag {
      END = "end",
      ERROR = "error"
    }
    
    export interface KeyValuePairNumber {
      [K: string]: number;
    }
    
    
    export enum UnitNavigationTarget {
      NEXT = "#next",
      ERROR = "#error",
      PREVIOUS = "#previous",
      FIRST = "#first",
      LAST = "#last",
    
      MENU = "#menu",
      PAUSE = "#pause"