ui

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IconPending = theme.IconPending
	IconRunning = theme.IconRunning
	IconSuccess = theme.IconSuccess
	IconError   = theme.IconError
	IconWarning = theme.IconWarning
	IconInfo    = theme.IconInfo
	IconArrow   = theme.IconArrow
	IconBullet  = theme.IconBullet
)

Status icons - using grove-core theme icons

Functions

func Box

func Box(title, content string) string

Box renders content in a styled box

func CodeBlock

func CodeBlock(code string) string

CodeBlock renders code in a styled block

func ErrorBox

func ErrorBox(err error) string

ErrorBox renders an error in a styled box

func Header(title, description string) string

Header renders a styled header with title and description

func InfoBox

func InfoBox(message string) string

InfoBox renders an info message in a styled box

func List

func List(items []string) string

List renders a bulleted list

func ProgressBar

func ProgressBar(current, total int, width int) string

ProgressBar renders a progress bar

func StepStatus

func StepStatus(number int, name string, status StepStatusType, duration time.Duration) string

StepStatus renders a step with its status

func SuccessBox

func SuccessBox(message string) string

SuccessBox renders a success message in a styled box

func Summary

func Summary(name string, success bool, duration time.Duration, stepCount int) string

Summary renders a scenario summary

Types

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer handles rendering test output with beautiful styling

func NewRenderer

func NewRenderer(writer io.Writer, verbose bool, width int) *Renderer

NewRenderer creates a new UI renderer

func (*Renderer) RenderCommandOutput

func (r *Renderer) RenderCommandOutput(stdout, stderr string)

RenderCommandOutput renders command output

func (*Renderer) RenderError

func (r *Renderer) RenderError(err error)

RenderError renders a standalone error

func (*Renderer) RenderInfo

func (r *Renderer) RenderInfo(message string)

RenderInfo renders an info message

func (*Renderer) RenderInteractivePrompt

func (r *Renderer) RenderInteractivePrompt(stepNumber int, step harness.Step)

RenderInteractivePrompt renders a prompt for interactive mode

func (*Renderer) RenderList

func (r *Renderer) RenderList(title string, items []string)

RenderList renders a list of items

func (*Renderer) RenderProgress

func (r *Renderer) RenderProgress(current, total int)

RenderProgress renders overall progress

func (*Renderer) RenderScenarioEnd

func (r *Renderer) RenderScenarioEnd(result *harness.Result)

RenderScenarioEnd renders the end of a scenario

func (*Renderer) RenderScenarioStart

func (r *Renderer) RenderScenarioStart(scenario *harness.Scenario)

RenderScenarioStart renders the start of a scenario

func (*Renderer) RenderStepEnd

func (r *Renderer) RenderStepEnd(stepNumber int, step harness.Step, result harness.StepResult)

RenderStepEnd renders the end of a step

func (*Renderer) RenderStepStart

func (r *Renderer) RenderStepStart(stepNumber int, step harness.Step)

RenderStepStart renders the start of a step

func (*Renderer) RenderSuccess

func (r *Renderer) RenderSuccess(message string)

RenderSuccess renders a success message

type StepStatusType

type StepStatusType int

StepStatusType represents the status of a step

const (
	StatusPending StepStatusType = iota
	StatusRunning
	StatusSuccess
	StatusError
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL