MaterialFormTestUtils
Utility class for testing material dynamic forms
Static Methods
static assertFormValue() | |||||||||
|---|---|---|---|---|---|---|---|---|---|
Asserts that the form has a specific value | |||||||||
Presentation | |||||||||
Parameters
Returnsvoid |
static assertMatFieldError() | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Asserts that a material field shows an error message | ||||||||||||
Presentation | ||||||||||||
Parameters
Returnsvoid |
static assertMatFieldValue() | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Asserts that a material field has a specific value | ||||||||||||
Presentation | ||||||||||||
Parameters
Returnsvoid |
static assertMatFormFieldAppearance() | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Asserts that a material form field has the correct appearance | ||||||||||||
Presentation | ||||||||||||
Parameters
Returnsvoid |
static builder() |
|---|
Creates a new material form config builder |
Presentation |
Returns |
static async createTest() | ||||||
|---|---|---|---|---|---|---|
Creates a material dynamic form test setup with proper providers | ||||||
Presentation | ||||||
Parameters
ReturnsPromise< |
static getFormErrors() | ||||||
|---|---|---|---|---|---|---|
Gets validation errors from the component | ||||||
Presentation | ||||||
Parameters
Returnsany[] |
static getFormValue() | ||||||
|---|---|---|---|---|---|---|
Gets the current form value from the component | ||||||
Presentation | ||||||
Parameters
ReturnsRecord<string, unknown> |
static getMatFieldElements() | |||||||||
|---|---|---|---|---|---|---|---|---|---|
Gets all material field elements from the fixture | |||||||||
Presentation | |||||||||
Parameters
ReturnsNodeListOf<Element> |
static isFormValid() | ||||||
|---|---|---|---|---|---|---|
Checks if the form is valid | ||||||
Presentation | ||||||
Parameters
Returnsboolean |
static async simulateMatButtonClick() | |||||||||
|---|---|---|---|---|---|---|---|---|---|
Simulates material button click | |||||||||
Presentation | |||||||||
Parameters
ReturnsPromise<void> |
static async simulateMatCheckbox() | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Simulates material checkbox toggle | ||||||||||||
Presentation | ||||||||||||
Parameters
ReturnsPromise<void> |
static async simulateMatInput() | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Simulates user input on a material input field | ||||||||||||
Presentation | ||||||||||||
Parameters
ReturnsPromise<void> |
static async simulateMatSelect() | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Simulates user selection on a material select | ||||||||||||
Presentation | ||||||||||||
Parameters
ReturnsPromise<void> |
static async simulateMatToggle() | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Simulates material toggle switch | ||||||||||||
Presentation | ||||||||||||
Parameters
ReturnsPromise<void> |
static async waitForInit() | ||||||
|---|---|---|---|---|---|---|
Waits for the material dynamic form to initialize | ||||||
Presentation | ||||||
Parameters
ReturnsPromise<void> |