Script API - v26.50.24
    Preparing search index...

    Executes a set of steps defined via chained .thenXyz methods, sequentially. This facilitates a 'script' of GameTest setup methods and assertions over time.

    export class GameTestSequence {
    private constructor();
    thenExecute(callback: () => void): GameTestSequence;
    thenExecuteAfter(delayTicks: number, callback: () => void): GameTestSequence;
    thenExecuteFor(tickCount: number, callback: () => void): GameTestSequence;
    thenFail(errorMessage: string): void;
    thenIdle(delayTicks: number): GameTestSequence;
    thenSucceed(): void;
    thenWait(callback: () => void): GameTestSequence;
    thenWaitAfter(delayTicks: number, callback: () => void): GameTestSequence;
    }
    Index

    Constructors

    Methods

    • Parameters

      • callback: () => void

        Callback function to execute.

      Returns GameTestSequence

      Returns a GameTestSequence object where additional .thenXyz method steps can be added.

      Runs the given callback as a step within a GameTest sequence. Exceptions thrown within the callback will end sequence execution.

      no-restricted-execution - This function can't be called in restricted-execution mode.

      This function can't be called in early-execution mode.

    • Parameters

      • delayTicks: number

        Number of ticks to wait before executing the callback.

      • callback: () => void

        Callback function to execute.

      Returns GameTestSequence

      Returns a GameTestSequence object where additional .thenXyz method steps can be added.

      After a delay, runs the given callback as a step within a GameTest sequence. Exceptions thrown within the callback will end sequence execution.

      no-restricted-execution - This function can't be called in restricted-execution mode.

      This function can't be called in early-execution mode.

    • Parameters

      • tickCount: number
      • callback: () => void

        Callback function to execute.

      Returns GameTestSequence

      Returns a GameTestSequence object where additional .thenXyz method steps can be added.

      Runs the given callback every tick for the given number of ticks.

      no-restricted-execution - This function can't be called in restricted-execution mode.

      This function can't be called in early-execution mode.

    • Parameters

      • errorMessage: string

        Error message summarizing the failure condition.

      Returns void

      Causes the test to fail if this step in the GameTest sequence is reached.

      no-restricted-execution - This function can't be called in restricted-execution mode.

      This function can't be called in early-execution mode.

    • Parameters

      • delayTicks: number

        Number of ticks to delay for this step in the GameTest sequence.

      Returns GameTestSequence

      Returns a GameTestSequence object where additional .thenXyz method steps can be added.

      Idles the GameTest sequence for the specified delayTicks.

      no-restricted-execution - This function can't be called in restricted-execution mode.

      This function can't be called in early-execution mode.

    • Returns void

      Marks the GameTest a success if this step is reached in the GameTest sequence.

      no-restricted-execution - This function can't be called in restricted-execution mode.

      This function can't be called in early-execution mode.

    • Parameters

      • callback: () => void

        Testing callback function to execute. Typically, this function will have .assertXyz functions within it.

      Returns GameTestSequence

      Returns a GameTestSequence object where additional .thenXyz method steps can be added.

      Executes the given callback every tick until it succeeds. Exceptions thrown within the callback will end sequence execution.

      no-restricted-execution - This function can't be called in restricted-execution mode.

      This function can't be called in early-execution mode.

    • Parameters

      • delayTicks: number

        Tick (after the previous step in the GameTest sequence) to run the callback at.

      • callback: () => void

        Testing callback function to execute. Typically, this function will have .assertXyz functions within it.

      Returns GameTestSequence

      Returns a GameTestSequence object where additional .thenXyz method steps can be added.

      After a delay from the previous step, executes the given callback every tick until it succeeds. Exceptions thrown within the callback will end sequence execution.

      no-restricted-execution - This function can't be called in restricted-execution mode.

      This function can't be called in early-execution mode.