components

package
v1.2.23 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Slightly wider than the minimum width for
	// horizontal layout for test execution view
	TestViewMinRecommendedWidth  = 150
	TestViewMinRecommendedHeight = 40

	// Below this, show warning overlay
	TestViewAbsoluteMinWidth  = 60
	TestViewAbsoluteMinHeight = 25
)
View Source
const (
	ListViewMinRecommendedWidth  = 140
	ListViewMinRecommendedHeight = 20

	// Below this, show warning overlay
	ListViewAbsoluteMinWidth  = 55
	ListViewAbsoluteMinHeight = 15
)

Variables

This section is empty.

Functions

func Footer(width int, helpText string) string

func Title

func Title(width int, text string) string

Types

type LogPanelComponent

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

func NewLogPanelComponent

func NewLogPanelComponent() *LogPanelComponent

func (*LogPanelComponent) AddServiceLog

func (lp *LogPanelComponent) AddServiceLog(line string)

func (*LogPanelComponent) AddTestLog

func (lp *LogPanelComponent) AddTestLog(testID, line string)

func (*LogPanelComponent) GetRawLogs

func (lp *LogPanelComponent) GetRawLogs() string

GetRawLogs returns unwrapped logs for copy mode

func (*LogPanelComponent) IsFocused

func (lp *LogPanelComponent) IsFocused() bool

func (*LogPanelComponent) SetCurrentTest

func (lp *LogPanelComponent) SetCurrentTest(testID string)

func (*LogPanelComponent) SetFocused

func (lp *LogPanelComponent) SetFocused(focused bool)

func (*LogPanelComponent) Update

func (lp *LogPanelComponent) Update(msg tea.Msg) tea.Cmd

func (*LogPanelComponent) View

func (lp *LogPanelComponent) View(width, height int) string

type SelectorOption added in v0.1.23

type SelectorOption struct {
	ID    string
	Label string
}

SelectorOption represents a selectable item

func RunSelector added in v0.1.23

func RunSelector(prompt string, options []SelectorOption, currentID string) (*SelectorOption, error)

RunSelector runs an interactive selector and returns the selected option

type TerminalSizeWarning added in v0.1.16

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

TerminalSizeWarning handles the terminal size warning overlay

func NewListViewSizeWarning added in v0.1.16

func NewListViewSizeWarning() *TerminalSizeWarning

NewListViewSizeWarning creates a warning for list view

func NewTerminalSizeWarning added in v0.1.16

func NewTerminalSizeWarning(minWidth, minHeight, recommendedWidth, recommendedHeight int) *TerminalSizeWarning

func NewTestViewSizeWarning added in v0.1.16

func NewTestViewSizeWarning() *TerminalSizeWarning

NewTestExecutorSizeWarning creates a warning for test view

func (*TerminalSizeWarning) Dismiss added in v0.1.16

func (w *TerminalSizeWarning) Dismiss()

Dismiss marks the warning as dismissed

func (*TerminalSizeWarning) IsDismissed added in v0.1.16

func (w *TerminalSizeWarning) IsDismissed() bool

IsDismissed returns whether the warning has been dismissed

func (*TerminalSizeWarning) IsTooSmall added in v0.1.16

func (w *TerminalSizeWarning) IsTooSmall(width, height int) bool

IsTooSmall checks if the terminal size is below minimum

func (*TerminalSizeWarning) Reset added in v0.1.16

func (w *TerminalSizeWarning) Reset()

Reset resets the dismissed state (useful when window becomes large then small again)

func (*TerminalSizeWarning) ShouldShow added in v0.1.16

func (w *TerminalSizeWarning) ShouldShow(width, height int) bool

ShouldShow returns true if the warning should be displayed

func (*TerminalSizeWarning) View added in v0.1.16

func (w *TerminalSizeWarning) View(width, height int) string

View renders the warning overlay

type TestExecutionHeaderComponent

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

func NewTestExecutionHeaderComponent

func NewTestExecutionHeaderComponent(testCount int) *TestExecutionHeaderComponent

func (*TestExecutionHeaderComponent) SetCompleted

func (h *TestExecutionHeaderComponent) SetCompleted()

func (*TestExecutionHeaderComponent) SetInitialProgress added in v0.1.4

func (h *TestExecutionHeaderComponent) SetInitialProgress() tea.Cmd

func (*TestExecutionHeaderComponent) Update

func (h *TestExecutionHeaderComponent) Update(msg tea.Msg) tea.Cmd

func (*TestExecutionHeaderComponent) UpdateStats

func (h *TestExecutionHeaderComponent) UpdateStats(completed, passed, failed, running int) tea.Cmd

func (*TestExecutionHeaderComponent) View

func (h *TestExecutionHeaderComponent) View(width int) string

type TestTableComponent

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

func NewTestTableComponent

func NewTestTableComponent(tests []runner.Test) *TestTableComponent

func (*TestTableComponent) GetSelectedTest

func (tt *TestTableComponent) GetSelectedTest() *runner.Test

func (*TestTableComponent) GotoBottom

func (tt *TestTableComponent) GotoBottom()

func (*TestTableComponent) GotoTop

func (tt *TestTableComponent) GotoTop()

func (*TestTableComponent) IsFocused

func (tt *TestTableComponent) IsFocused() bool

func (*TestTableComponent) IsServiceLogsSelected

func (tt *TestTableComponent) IsServiceLogsSelected() bool

func (*TestTableComponent) SetFocused

func (tt *TestTableComponent) SetFocused(focused bool)

func (*TestTableComponent) Update

func (tt *TestTableComponent) Update(msg tea.Msg) tea.Cmd

func (*TestTableComponent) UpdateTestResult

func (tt *TestTableComponent) UpdateTestResult(index int, result runner.TestResult, err error)

func (*TestTableComponent) View

func (tt *TestTableComponent) View(width, height int) string

Jump to

Keyboard shortcuts

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