Class UiTestContext

java.lang.Object
com.render.testkit.UiTestContext

public final class UiTestContext extends Object
Read-only access to the actual opened fixture for immediate scenario assertions.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
     
    com.render.api.gui.GuiRect
    Returns the first nonempty final layout fragment, avoiding the gap between fragmented boxes.
    com.render.api.gui.GuiComponent<?>
     
    <C extends com.render.api.gui.GuiComponent<?>>
    C
    component(String id, Class<C> type)
     
    long
    Counts actual completed render frames, including readback/encoding wait frames.
    com.render.api.gui.ManagedHudLayoutRuntime
    Returns the exact runtime owned by this scenario's current managed HUD preview.
    net.minecraft.client.gui.screens.Screen
    Returns the current screen, or null after closing; permits explicit navigation assertions.
    com.render.api.gui.GuiView
    Returns the exact retained view instance opened by the fixture factory.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • screen

      public net.minecraft.client.gui.screens.Screen screen()
      Returns the current screen, or null after closing; permits explicit navigation assertions.
    • view

      public com.render.api.gui.GuiView view()
      Returns the exact retained view instance opened by the fixture factory.
    • managedHud

      public com.render.api.gui.ManagedHudLayoutRuntime managedHud()
      Returns the exact runtime owned by this scenario's current managed HUD preview. Inspect element cache/render statistics and authored roots here; use registered preview keyboard actions for mutations. Native screens, immediate HUDs, unrelated previews and removed previews fail with a lifecycle/type error.
      Returns:
      active fixture-owned managed HUD runtime
    • component

      public com.render.api.gui.GuiComponent<?> component(String id)
    • component

      public <C extends com.render.api.gui.GuiComponent<?>> C component(String id, Class<C> type)
    • bounds

      public com.render.api.gui.GuiRect bounds(String id)
      Returns the first nonempty final layout fragment, avoiding the gap between fragmented boxes.
    • frame

      public long frame()
      Counts actual completed render frames, including readback/encoding wait frames.
    • animationTimeSeconds

      public double animationTimeSeconds()