Documentation
¶
Overview ¶
Package matchers contains custom matches for use with the Gomega assertion library.
Index ¶
- func BeADOMError() GomegaMatcher
- func BeHTMLElement() GomegaMatcher
- func FormatDocument(value any) (result string, ok bool)
- func FormatElement(value any) (result string, ok bool)
- func HaveAttribute(name string, expected interface{}) GomegaMatcher
- func HaveFormDataValue(key, expected string) types.GomegaMatcher
- func HaveH1(expected string) GomegaMatcher
- func HaveInnerHTML(matcher GomegaMatcher) GomegaMatcher
- func HaveOuterHTML(expected interface{}) GomegaMatcher
- func HaveTag(expected string) GomegaMatcher
- func HaveTextContent(expected interface{}) GomegaMatcher
- type HtmlElementMatcher
- type MatcherScriptContext
- type ScriptMatchers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeADOMError ¶
func BeADOMError() GomegaMatcher
func BeHTMLElement ¶
func BeHTMLElement() GomegaMatcher
func FormatDocument ¶
func FormatElement ¶
func HaveAttribute ¶
func HaveAttribute(name string, expected interface{}) GomegaMatcher
func HaveFormDataValue ¶
func HaveFormDataValue(key, expected string) types.GomegaMatcher
func HaveInnerHTML ¶
func HaveInnerHTML(matcher GomegaMatcher) GomegaMatcher
func HaveOuterHTML ¶
func HaveOuterHTML(expected interface{}) GomegaMatcher
func HaveTextContent ¶
func HaveTextContent(expected interface{}) GomegaMatcher
Types ¶
type HtmlElementMatcher ¶
type HtmlElementMatcher struct{}
func (HtmlElementMatcher) FailureMessage ¶
func (m HtmlElementMatcher) FailureMessage(actual interface{}) (message string)
func (HtmlElementMatcher) NegatedFailureMessage ¶
func (m HtmlElementMatcher) NegatedFailureMessage(actual interface{}) (message string)
type MatcherScriptContext ¶
type MatcherScriptContext interface { html.ScriptContext EvalCore(string) (any, error) RunFunction(string, ...any) (any, error) Export(any) (any, error) }
MatcherScriptContext defines a set of functions a script context must support for the matchers to work.
type ScriptMatchers ¶
type ScriptMatchers struct{ Ctx MatcherScriptContext }
func (ScriptMatchers) BeInstanceOf ¶
func (m ScriptMatchers) BeInstanceOf(name string) types.GomegaMatcher
Click to show internal directories.
Click to hide internal directories.