fyne: fyne.io/fyne/test Index | Files

package test

import "fyne.io/fyne/test"

Package test provides utility drivers for running UI tests without rendering

Index

Package Files

device.go testapp.go testcanvas.go testclipboard.go testdriver.go testwindow.go util.go

func Canvas Uses

func Canvas() fyne.Canvas

Canvas returns a reusable in-memory canvas used for testing

func NewApp Uses

func NewApp() fyne.App

NewApp returns a new dummy app used for testing. It loads a test driver which creates a virtual window in memory for testing.

func NewClipboard Uses

func NewClipboard() fyne.Clipboard

NewClipboard returns a single use in-memory clipboard used for testing

func NewDriver Uses

func NewDriver() fyne.Driver

NewDriver sets up and registers a new dummy driver for test purpose

func NewDriverWithPainter Uses

func NewDriverWithPainter(painter SoftwarePainter) fyne.Driver

NewDriverWithPainter creates a new dummy driver that will pass the given painter to all canvases created

func NewWindow Uses

func NewWindow(content fyne.CanvasObject) fyne.Window

NewWindow creates and registers a new window for test purposes

func Tap Uses

func Tap(obj fyne.Tappable)

Tap simulates a left mouse click on the specified object.

func TapAt Uses

func TapAt(obj fyne.Tappable, pos fyne.Position)

TapAt simulates a left mouse click on the passed object at a specified place within it.

func TapSecondary Uses

func TapSecondary(obj fyne.Tappable)

TapSecondary simulates a right mouse click on the specified object.

func TapSecondaryAt Uses

func TapSecondaryAt(obj fyne.Tappable, pos fyne.Position)

TapSecondaryAt simulates a right mouse click on the passed object at a specified place within it.

func Type Uses

func Type(obj fyne.Focusable, chars string)

Type performs a series of key events to simulate typing of a value into the specified object. The focusable object will be focused before typing begins. The chars parameter will be input one rune at a time to the focused object.

func TypeOnCanvas Uses

func TypeOnCanvas(c fyne.Canvas, chars string)

TypeOnCanvas is like the Type function but it passes the key events to the canvas object rather than a focusable widget.

type SoftwarePainter Uses

type SoftwarePainter interface {
    Paint(fyne.Canvas) image.Image
}

SoftwarePainter describes a simple type that can render canvases

type WindowlessCanvas Uses

type WindowlessCanvas interface {
    fyne.Canvas

    Resize(fyne.Size)

    Padded() bool
    SetPadded(bool)
}

WindowlessCanvas provides functionality for a canvas to operate without a window

func NewCanvas Uses

func NewCanvas() WindowlessCanvas

NewCanvas returns a single use in-memory canvas used for testing

func NewCanvasWithPainter Uses

func NewCanvasWithPainter(painter SoftwarePainter) WindowlessCanvas

NewCanvasWithPainter allows creation of an in-memory canvas with a specific painter. The painter will be used to render in the Capture() call.

Package test imports 9 packages (graph). Updated 2019-12-17. Refresh now. Tools for package owners.