test

package
v0.8.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Host string

Functions

func Button

func Button(id string, handler func(context.Context) bool) gox.Elem

func Click

func Click(t *testing.T, page *rod.Page, selector string)

func ClickNow

func ClickNow(t *testing.T, page *rod.Page, selector string)

func Count

func Count(page *rod.Page, s string) int

func Document

func Document[P any](p page[P], b doors.Source[P]) gox.Elem

func Float

func Float(f float64) string

func GetContent

func GetContent(t *testing.T, page *rod.Page, selector string) string

func GetReportContent

func GetReportContent(t *testing.T, page *rod.Page, id int) string

func Marker

func Marker(id string) gox.Elem

func Report

func Report(value string) gox.Elem

func ReportId

func ReportId(id int, value string) gox.Elem

func TestAttr

func TestAttr(t *testing.T, page *rod.Page, selector string, name string, value string)

func TestAttrNo

func TestAttrNo(t *testing.T, page *rod.Page, selector string, name string)

func TestAttrNot

func TestAttrNot(t *testing.T, page *rod.Page, selector string, name string, value string)

func TestClass

func TestClass(t *testing.T, page *rod.Page, selector string, className string)

func TestClassNot

func TestClassNot(t *testing.T, page *rod.Page, selector string, className string)

func TestContent

func TestContent(t *testing.T, page *rod.Page, selector string, content string)

func TestDeselect

func TestDeselect(t *testing.T, page *rod.Page, selector string, options []string)

func TestInput

func TestInput(t *testing.T, page *rod.Page, selector string, value string)

func TestInputColor

func TestInputColor(t *testing.T, page *rod.Page, selector string, color string)

func TestInputTime

func TestInputTime(t *testing.T, page *rod.Page, selector string, now time.Time)

func TestMust

func TestMust(t *testing.T, page *rod.Page, selector string)

func TestMustNot

func TestMustNot(t *testing.T, page *rod.Page, selector string)

func TestReport

func TestReport(t *testing.T, page *rod.Page, content string)

func TestReportId

func TestReportId(t *testing.T, page *rod.Page, id int, content string)

func TestSelect

func TestSelect(t *testing.T, page *rod.Page, selector string, options []string)

func TestType

func TestType(t *testing.T, page *rod.Page, selector string, keys []input.Key)

func Text

func Text(s string) gox.Editor

Types

type Bro

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

func NewBro

func NewBro(browser *rod.Browser, mod func(r doors.Router)) *Bro

func NewFragmentBro

func NewFragmentBro(b *rod.Browser, f func() Fragment) *Bro

func (*Bro) Close

func (s *Bro) Close()

func (*Bro) Page

func (s *Bro) Page(t *testing.T, path string) *rod.Page

func (*Bro) PageStatus

func (s *Bro) PageStatus(t *testing.T, path string, status int) *rod.Page

type Fragment

type Fragment interface {
	gox.Comp
	// contains filtered or unexported methods
}

type NoBeam

type NoBeam struct{}

type Page

type Page struct {
	F      Fragment
	H      func(doors.Source[Path]) gox.Elem
	Header string
}

func (*Page) Main

func (p *Page) Main(b doors.Source[Path]) gox.Elem

type Path

type Path struct {
	Vh bool `path:""`
	Vs bool `path:"/s"`
	Vp bool `path:"/s/:P"`
	P  string
}

type RandFile

type RandFile struct {
	Path string
	Hash string // SHA-256 hex digest of the file content
}

func NewRandFile

func NewRandFile(size int64) RandFile

func (*RandFile) IsSame

func (r *RandFile) IsSame(path string) bool

type Reporter

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

func NewReporter

func NewReporter(size int) *Reporter

func (*Reporter) Main

func (r *Reporter) Main() gox.Elem

func (*Reporter) Update

func (r *Reporter) Update(ctx context.Context, i int, content string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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