engine

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 32 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Describe

func Describe(c *flow.Command) string

Types

type AnnotateEvent added in v0.6.4

type AnnotateEvent struct {
	At   time.Time
	Text string
}

type CSSQuerier

type CSSQuerier interface {
	QueryCSS(ctx context.Context, css string) ([]int, error)
}

type DarkModer

type DarkModer interface {
	SetDarkMode(ctx context.Context, on bool) error
	DarkMode(ctx context.Context) (bool, error)
}

type Event

type Event struct {
	Device  string
	Cmd     *flow.Command
	Desc    string
	Depth   int
	Start   bool
	Status  Status
	Err     error
	Elapsed time.Duration
	Log     string
	Hint    string
}

type FlowError

type FlowError struct {
	Msg string
	// contains filtered or unexported fields
}

func (*FlowError) Error

func (e *FlowError) Error() string

type FlowResult

type FlowResult struct {
	Name     string
	File     string
	Status   Status
	Err      error
	Duration time.Duration
	Steps    []StepResult
	Videos   []Video
}

type NotFound

type NotFound struct {
	FlowError
	Screen *ui.Screen
	Query  string
	// contains filtered or unexported fields
}

type Options

type Options struct {
	Env             []flow.KV
	LookupTimeout   time.Duration
	OptionalTimeout time.Duration
	ArtifactsDir    string
	Reporter        Reporter
	Role            string
	Signals         *Signals
	JS              *js.Engine
	Trace           *Trace
	Timeline        *timeline.Recorder
	Record          bool
	Annotate        bool
	AnnotateEvents  func(role string, since, start, end time.Time) []AnnotateEvent
	AnnotateStep    time.Duration
	StallFloor      time.Duration
	AwayGrace       time.Duration
}

type Reporter

type Reporter interface{ Event(Event) }

type ReporterFunc

type ReporterFunc func(Event)

func (ReporterFunc) Event

func (f ReporterFunc) Event(e Event)

type Runner

type Runner struct {
	Drv driver.Driver
	// contains filtered or unexported fields
}

func New

func New(drv driver.Driver, opts Options) *Runner

func (*Runner) Begin

func (r *Runner) Begin(f *flow.Flow, extraEnv []flow.KV) error

func (*Runner) End

func (r *Runner) End()

func (*Runner) LastScreen

func (r *Runner) LastScreen() *ui.Screen

func (*Runner) Locate added in v0.5.0

func (r *Runner) Locate(ctx context.Context, s *ui.Screen, selector *flow.Selector) (*ui.Node, []*ui.Node, error)

func (*Runner) RunCommands

func (r *Runner) RunCommands(ctx context.Context, cmds []*flow.Command, appID string, onStep func(StepResult)) error

func (*Runner) RunFlow

func (r *Runner) RunFlow(ctx context.Context, f *flow.Flow) (res FlowResult)

func (*Runner) RunList

func (r *Runner) RunList(ctx context.Context, cmds []*flow.Command, f *flow.Flow) error

func (*Runner) SetAppID

func (r *Runner) SetAppID(id string)

func (*Runner) SetEnv

func (r *Runner) SetEnv(kvs []flow.KV) error

func (*Runner) Videos added in v0.5.3

func (r *Runner) Videos() []Video

type Signals

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

func NewSignals

func NewSignals() *Signals

func (*Signals) Send

func (s *Signals) Send(name string)

func (*Signals) Wait

func (s *Signals) Wait(ctx context.Context, name string, timeout time.Duration) error

type Status

type Status string
const (
	Passed  Status = "passed"
	Warned  Status = "warned"
	Skipped Status = "skipped"
	Failed  Status = "failed"
)

type StepResult

type StepResult struct {
	Desc     string
	Status   Status
	Err      string
	Duration time.Duration
	Hints    []string
}

type Trace

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

func NewTrace

func NewTrace(w io.Writer) *Trace

func (*Trace) Printf

func (t *Trace) Printf(role string, depth int, format string, a ...any)

func (*Trace) Tee added in v0.5.3

func (t *Trace) Tee(fn func(role string, depth int, msg string))

type Video added in v0.5.3

type Video struct {
	Path  string
	Role  string
	Start time.Time
	End   time.Time
	Flow  bool
}

Jump to

Keyboard shortcuts

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