File

src/jasmine-matchers.ts

Index

Methods

Methods

toBeChecked
toBeChecked()

Checks that the receiver is a TestInput and is checked

Returns : boolean
toBeVisible
toBeVisible()

Checks that the receiver is a TestHtmlElement which is visible.

Returns : boolean
toContainText
toContainText(textContent: string)

Checks that the receiver is a TestElement wrapping a DOM element and contains the given textContent

Parameters :
Name Type Optional
textContent string No
Returns : boolean
toHaveClass
toHaveClass(className: string)

Checks that the receiver is a TestElement wrapping a DOM element and has the given CSS class

Parameters :
Name Type Optional
className string No
Returns : boolean
toHaveSelectedIndex
toHaveSelectedIndex(index: number)

Checks that the receiver is a TestSelect wrapping a DOM element and has the given selected index

Parameters :
Name Type Optional
index number No
Returns : boolean
toHaveSelectedLabel
toHaveSelectedLabel(label: string)

Checks that the receiver is a TestSelect wrapping a DOM element with the selected option's label equal to the given label

Parameters :
Name Type Optional
label string No
Returns : boolean
toHaveSelectedValue
toHaveSelectedValue(value: string)

Checks that the receiver is a TestSelect wrapping a DOM element with the selected option's value equal to the given value

Parameters :
Name Type Optional
value string No
Returns : boolean
toHaveText
toHaveText(textContent: string)

Checks that the receiver is a TestElement wrapping a DOM element and has the exact given textContent

Parameters :
Name Type Optional
textContent string No
Returns : boolean
toHaveTrimmedText
toHaveTrimmedText(textContent: string)

Checks that the receiver is a TestElement wrapping a DOM element and has the given textContent after both have been trimmed.

Parameters :
Name Type Optional
textContent string No
Returns : boolean
toHaveValue
toHaveValue(value: string)

Checks that the receiver is a TestInput or a TestTextArea and has the given value

Parameters :
Name Type Optional
value string No
Returns : boolean
declare namespace jasmine {
  interface Matchers<T> {
    /**
     * Checks that the receiver is a TestElement wrapping a DOM element and has the given CSS class
     */
    toHaveClass(className: string): boolean;

    /**
     * Checks that the receiver is a TestInput or a TestTextArea and has the given value
     */
    toHaveValue(value: string): boolean;

    /**
     * Checks that the receiver is a TestElement wrapping a DOM element and has the exact given textContent
     */
    toHaveText(textContent: string): boolean;

    /**
     * Checks that the receiver is a TestElement wrapping a DOM element and has the given textContent
     * after both have been trimmed.
     */
    toHaveTrimmedText(textContent: string): boolean;

    /**
     * Checks that the receiver is a TestElement wrapping a DOM element and contains the given textContent
     */
    toContainText(textContent: string): boolean;

    /**
     * Checks that the receiver is a TestInput and is checked
     */
    toBeChecked(): boolean;

    /**
     * Checks that the receiver is a TestSelect wrapping a DOM element and has the given selected index
     */
    toHaveSelectedIndex(index: number): boolean;

    /**
     * Checks that the receiver is a TestSelect wrapping a DOM element with the selected option's value equal to the given value
     */
    toHaveSelectedValue(value: string): boolean;

    /**
     * Checks that the receiver is a TestSelect wrapping a DOM element with the selected option's label equal to the given label
     */
    toHaveSelectedLabel(label: string): boolean;

    /**
     * Checks that the receiver is a TestHtmlElement which is visible.
     */
    toBeVisible(): boolean;
  }
}

results matching ""

    No results matching ""