matchers

package
v2.0.0-...-b920a9c Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package matchers provides a set of Gomega-compatible matchers for use with the agouti package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeActive

func BeActive() types.GomegaMatcher

BeActive passes when the selection refers to the active page element.

func BeEnabled

func BeEnabled() types.GomegaMatcher

BeEnabled passes when the selection refers to form elements that are enabled. This matcher will fail if any of the selection's form elements are not enabled.

func BeFound

func BeFound() types.GomegaMatcher

BeFound passes when the provided selection refers to one or more elements on the page.

func BeSelected

func BeSelected() types.GomegaMatcher

BeSelected passes when the provided selection refers to form elements that are selected. Examples: a checked <input type="checkbox" />, or the selected <option> in a <select> This matcher will fail if any of the selection's form elements are not selected.

func BeVisible

func BeVisible() types.GomegaMatcher

BeVisible passes when the selection refers to elements that are displayed on the page. This matcher will fail if any of the selection's elements are not visible.

func EqualElement

func EqualElement(comparable interface{}) types.GomegaMatcher

EqualElement passes when the expected selection refers to the same element as the provided actual selection. This matcher will fail if either selection refers to more than one element.

func HaveAttribute

func HaveAttribute(attribute string, value string) types.GomegaMatcher

HaveAttribute passes when the expected attribute and value are present on the element. This matcher will fail if the provided selection refers to more than one element.

func HaveCSS

func HaveCSS(property string, value string) types.GomegaMatcher

HaveCSS passes when the expected CSS property and value are present on the element. This matcher only matches exact, calculated CSS values, though there is support for parsing colors. Example: "blue" and "#00f" will both match rgba(0, 0, 255, 1) This matcher will fail if the provided selection refers to more than one element.

func HaveLoggedError

func HaveLoggedError(messageOrEmpty ...string) types.GomegaMatcher

HaveLoggedError passes when the expected log message is logged as an error in the browser console.

func HaveLoggedInfo

func HaveLoggedInfo(messageOrEmpty ...string) types.GomegaMatcher

HaveLoggedInfo passes when the expected log message is logged as info in the browser console.

func HavePopupText

func HavePopupText(text string) types.GomegaMatcher

HavePopupText passes when the expected text is equivalent to the text contents of an open alert, confirm, or prompt popup.

func HaveText

func HaveText(text string) types.GomegaMatcher

HaveText passes when the expected text is equal to the actual element text. This matcher will fail if the provided selection refers to more than one element.

func HaveTitle

func HaveTitle(title string) types.GomegaMatcher

HaveTitle passes when the expected title is equivalent to the title of the provided page.

func HaveURL

func HaveURL(URL string) types.GomegaMatcher

HaveURL passes when the expected URL is equivalent to the current URL of the provided page.

func MatchText

func MatchText(regexp string) types.GomegaMatcher

MatchText passes when the expected regular expression matches the actual element text. This matcher will fail if the provided selection refers to more than one element.

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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