| checkField | ||||||||||||||||
checkField(fixture: ComponentFixture, testId: string, checked: boolean)
|
||||||||||||||||
|
Checks or unchecks a checkbox or radio button. Triggers appropriate events so Angular takes notice of the change.
Parameters :
Returns :
void
|
| click | ||||||||||||
click(fixture: ComponentFixture, testId: string)
|
||||||||||||
|
Emulates a left click on the element with the given
Parameters :
Returns :
void
|
| dispatchFakeEvent | ||||||||||||||||||||
dispatchFakeEvent(element: EventTarget, type: string, bubbles)
|
||||||||||||||||||||
|
Dispatches a fake event (synthetic event) at the given element.
Parameters :
Returns :
void
|
| expectContainedText | ||||||||||||
expectContainedText(fixture: ComponentFixture, text: string)
|
||||||||||||
|
Expects that the element with the given
Parameters :
Returns :
void
|
| expectContent | ||||||||||||
expectContent(fixture: ComponentFixture, text: string)
|
||||||||||||
|
Expects that a component has the given text content. Both the component text content and the expected text are trimmed for reliability.
Parameters :
Returns :
void
|
| expectText | ||||||||||||||||
expectText(fixture: ComponentFixture, testId: string, text: string)
|
||||||||||||||||
|
Expects that the element with the given
Parameters :
Returns :
void
|
| findComponent | ||||||||||||
findComponent(fixture: ComponentFixture, selector: string)
|
||||||||||||
|
Finds a nested Component by its selector, e.g.
Parameters :
Returns :
DebugElement
|
| findComponents | |||||||||
findComponents(fixture: ComponentFixture, selector: string)
|
|||||||||
|
Finds all nested Components by its selector, e.g.
Parameters :
Returns :
DebugElement[]
|
| findEl | ||||||||||||
findEl(fixture: ComponentFixture, testId: string)
|
||||||||||||
|
Finds an element inside the Component by the given
Parameters :
Returns :
DebugElement
|
| findEls | ||||||||||||
findEls(fixture: ComponentFixture, testId: string)
|
||||||||||||
|
Finds all elements with the given
Parameters :
Returns :
DebugElement[]
|
| getText | ||||||||||||
getText(fixture: ComponentFixture, testId: string)
|
||||||||||||
|
Gets the text content of an element with the given
Parameters :
Returns :
string
|
| queryByCss | ||||||||||||
queryByCss(fixture: ComponentFixture, selector: string)
|
||||||||||||
|
Finds a single element inside the Component by the given CSS selector. Throws an error if no element was found.
Parameters :
Returns :
DebugElement
|
| setFieldElementValue | ||||||||||||
setFieldElementValue(element, value: string)
|
||||||||||||
|
Enters text into a form field (
Parameters :
Returns :
void
|
| setFieldValue | ||||||||||||||||
setFieldValue(fixture: ComponentFixture, testId: string, value: string)
|
||||||||||||||||
|
Sets the value of a form field with the given
Parameters :
Returns :
void
|
| testIdSelector | ||||||||
testIdSelector(testId: string)
|
||||||||
|
Returns a selector for the
Parameters :
Returns :
string
|
| confirmBeforeClose | ||||||||
confirmBeforeClose(guard: BeforeCloseGuard)
|
||||||||
|
RxJS operator to add a confirmation guard before closing a dialog. The guard is only called when closing without a result (cancel/close button).
Parameters :
Returns :
OperatorFunction<R | undefined, R | undefined>
|
| formatTime | ||||||||
formatTime(totalSeconds: number)
|
||||||||
|
Format time in seconds to a readable format.
Parameters :
Returns :
string
A string that contains the formatted time |
| sleep | ||||||||
sleep(ms: number)
|
||||||||
|
Sleeps for a specified number of milliseconds.
Parameters :
Returns :
Promise<void>
A Promise that resolves after the specified delay. |
| useMemo | ||||||||
useMemo(fnToMemoize: T)
|
||||||||
|
Memoizes a function by caching its result based on the input arguments. This utility function takes a function
Parameters :
Returns :
T
|