package test
import "fyne.io/fyne/test"
Package test provides utility drivers for running UI tests without rendering
Index ¶
- func Canvas() fyne.Canvas
- func NewApp() fyne.App
- func NewCanvas() fyne.Canvas
- func NewClipboard() fyne.Clipboard
- func NewDriver() fyne.Driver
- func NewWindow(content fyne.CanvasObject) fyne.Window
- func Tap(obj fyne.Tappable)
- func Type(obj fyne.Focusable, chars string)
- func TypeOnCanvas(c fyne.Canvas, chars string)
Functions ¶
func Canvas ¶
Canvas returns a reusable in-memory canvas used for testing
func NewApp ¶
NewApp returns a new dummy app used for testing.. It loads a test driver which creates a virtual window in memory for testing.
func NewCanvas ¶
NewCanvas returns a single use in-memory canvas used for testing
func NewClipboard ¶
NewClipboard returns a single use in-memory clipboard used for testing
func NewDriver ¶
NewDriver sets up and registers a new dummy driver for test purpose
func NewWindow ¶
func NewWindow(content fyne.CanvasObject) fyne.Window
NewWindow creates and registers a new window for test purposes
func Tap ¶
Tap simulates a mouse click on the specified object
func Type ¶
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 ¶
TypeOnCanvas is like the Type function but it passes the key events to the canvas object rather than a focusable widget.
Source Files ¶
testapp.go testcanvas.go testclipboard.go testdriver.go testwindow.go util.go
- Version
- v1.1.0
- Published
- Jun 21, 2019
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 8 seconds ago –
Tools for package owners.