Class UiTestScenario.Builder

java.lang.Object
com.render.testkit.UiTestScenario.Builder
Enclosing class:
UiTestScenario

public static final class UiTestScenario.Builder extends Object
Builds a bounded sequence; actions run between completed frames, rather than during catch-up client ticks.
  • Method Details

    • coordinates

    • timeoutSeconds

      public UiTestScenario.Builder timeoutSeconds(int value)
      Bounds one scenario, including asynchronous screenshots and video encoding, to 1..600 seconds.
    • mouseMove

      public UiTestScenario.Builder mouseMove(double x, double y)
    • click

      public UiTestScenario.Builder click(double x, double y, int button)
    • clickComponent

      public UiTestScenario.Builder clickComponent(String id)
      Clicks the current border-box center of a uniquely identified managed component.
    • drag

      public UiTestScenario.Builder drag(double fromX, double fromY, double toX, double toY, int frames)
      Holds the left button and dispatches one interpolated drag position per rendered frame.
    • scroll

      public UiTestScenario.Builder scroll(double x, double y, double horizontal, double vertical)
    • key

      public UiTestScenario.Builder key(int keyCode, int modifiers)
      Dispatches a key press and release using GLFW key codes and modifier flags.
    • type

      public UiTestScenario.Builder type(String text)
      Sends Unicode code points through Screen.charTyped; it does not directly assign an input's value.
    • waitFrames

      public UiTestScenario.Builder waitFrames(int frames)
      Waits completed render frames without advancing the controlled animation clock.
    • animationTime

      public UiTestScenario.Builder animationTime(double seconds)
      Sets RenderLib's animation clock; Minecraft ticks and arbitrary mod timers remain real-time.
    • advanceFrames

      public UiTestScenario.Builder advanceFrames(int frames, double secondsPerFrame)
      Advances the RenderLib animation clock once per completed logical frame.
    • assertThat

      public UiTestScenario.Builder assertThat(String label, Predicate<UiTestContext> assertion)
      Evaluates a named, immediate and side-effect-free state assertion on the client thread.
    • assertPixel

      public UiTestScenario.Builder assertPixel(String label, double x, double y, com.render.api.RenderColor color, int tolerance)
      Compares one actual framebuffer pixel, including alpha, with a per-channel 0..255 tolerance.
    • checkpoint

      public UiTestScenario.Builder checkpoint(String label)
    • startVideo

      public UiTestScenario.Builder startVideo(String label)
      Starts a bounded MP4 recording. PNG frames remain available if encoding fails.
    • startVideo

      public UiTestScenario.Builder startVideo(String label, int fps)
      Overrides the request's recording rate for this video.
    • stopVideo

      public UiTestScenario.Builder stopVideo()
    • build

      public UiTestScenario build()