test

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: AGPL-3.0 Imports: 0 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 ClickBurst

func ClickBurst(t *testing.T, page *rod.Page, selectors ...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 page) 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 LimitMode

func LimitMode() bool

func Marker

func Marker(id string) gox.Elem

func NewBrowser

func NewBrowser() *rod.Browser

func Report

func Report(value string) gox.Elem

func ReportId

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

func RunMain

func RunMain(run func() int)

RunMain executes an e2e test package. When BOTH is set, the current test binary is re-run twice: once in default mode and once with LIMIT=1.

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 Beam

type Beam struct {
	B doors.Source[Path]
}

type Bro

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

func NewBro

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

func NewBroWrap

func NewBroWrap(browser *rod.Browser, mod func(r doors.Router), wrap func(http.Handler) http.Handler) *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 {
	Source doors.Source[Path]
	F      Fragment
	H      func(doors.Source[Path]) gox.Elem
	Header string
}

func (*Page) Main

func (p *Page) Main() 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