MinimalTestBuilder
MINIMAL TEST DATA BUILDERS
Philosophy: Only create what you're testing
Benefits:
- Clear intent (builder name matches test purpose)
- Fast execution (no unnecessary fields/data)
- Reusable (consistent patterns across tests)
- Maintainable (change in one place)
Static Methods
static minimal() | ||||||
|---|---|---|---|---|---|---|
Absolute minimum: single field with default config Use when testing framework basics, not specific properties | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withAppearance() | ||||||
|---|---|---|---|---|---|---|
Single field with Material appearance Use when testing Material-specific styling | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withCheckbox() |
|---|
Single checkbox Use when testing checkbox rendering |
Presentation |
Returns{ config: |
static withCheckboxColor() | ||||||
|---|---|---|---|---|---|---|
Multi-checkbox with color Use when testing Material color theme | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withCheckboxColorSingle() | ||||||
|---|---|---|---|---|---|---|
Checkbox with color Use when testing Material color theme | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withCheckboxLabelPosition() | ||||||
|---|---|---|---|---|---|---|
Multi-checkbox with label position Use when testing checkbox label positioning | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withCheckboxLabelPositionSingle() | ||||||
|---|---|---|---|---|---|---|
Checkbox with label position Use when testing checkbox label positioning | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withCheckboxOptions() | ||||||
|---|---|---|---|---|---|---|
Single multi-checkbox with options Use when testing checkbox group rendering | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withClassName() | |||||||||
|---|---|---|---|---|---|---|---|---|---|
Single field with custom CSS class Use when testing custom styling | |||||||||
Presentation | |||||||||
Parameters
Returns{ config: |
static withCols() | ||||||
|---|---|---|---|---|---|---|
Single textarea with cols attribute Use when testing textarea columns configuration | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withDisabled() | ||||||
|---|---|---|---|---|---|---|
Single field with disabled state Use when testing disabled behavior | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withDisabledCheckboxOption() |
|---|
Multi-checkbox with disabled option Use when testing disabled option state |
Presentation |
Returns{ config: |
static withDisabledOption() |
|---|
Single select with disabled option Use when testing option disabled state |
Presentation |
Returns{ config: |
static withHint() | ||||||
|---|---|---|---|---|---|---|
Single field with hint text Use when testing hint/help text rendering | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withInputType() | ||||||
|---|---|---|---|---|---|---|
Single input field with specific type attribute Use when testing input type rendering (email, password, number, etc.) | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withLabel() | |||||||||
|---|---|---|---|---|---|---|---|---|---|
Single field with label Use when testing label rendering | |||||||||
Presentation | |||||||||
Parameters
Returns{ config: |
static withMaxLength() | ||||||
|---|---|---|---|---|---|---|
Single textarea with maxLength attribute Use when testing maxlength validation | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withMultipleFields() | |||||||||
|---|---|---|---|---|---|---|---|---|---|
Multiple fields of same type Use when testing multiple field rendering or interaction | |||||||||
Presentation | |||||||||
Parameters
Returns{ config: |
static withMultiSelect() |
|---|
Single multi-select Use when testing multiple selection |
Presentation |
Returns{ config: |
static withPlaceholder() | |||||||||
|---|---|---|---|---|---|---|---|---|---|
Single field with placeholder Use when testing placeholder attribute | |||||||||
Presentation | |||||||||
Parameters
Returns{ config: |
static withRadioColor() | ||||||
|---|---|---|---|---|---|---|
Radio group with color Use when testing Material color theme | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withRadioLabelPosition() | ||||||
|---|---|---|---|---|---|---|
Radio group with label position Use when testing radio label positioning | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withRadioOptions() | ||||||
|---|---|---|---|---|---|---|
Single radio group with options Use when testing radio group rendering | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withRequired() | |||||||||
|---|---|---|---|---|---|---|---|---|---|
Single field marked as required Use when testing required validation | |||||||||
Presentation | |||||||||
Parameters
Returns{ config: |
static withResize() | ||||||
|---|---|---|---|---|---|---|
Single textarea with resize style Use when testing textarea resize behavior | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withRows() | ||||||
|---|---|---|---|---|---|---|
Single textarea with rows attribute Use when testing textarea rows configuration | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withSelectOptions() | ||||||
|---|---|---|---|---|---|---|
Single select with simple options Use when testing basic select rendering | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withSliderColor() | ||||||
|---|---|---|---|---|---|---|
Slider with color Use when testing Material color theme | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withSliderRange() | |||||||||
|---|---|---|---|---|---|---|---|---|---|
Single slider with min/max Use when testing slider range | |||||||||
Presentation | |||||||||
Parameters
Returns{ config: |
static withSliderStep() | ||||||
|---|---|---|---|---|---|---|
Slider with step value Use when testing slider steps | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withSliderThumbLabel() |
|---|
Slider with thumb label Use when testing thumb label display |
Presentation |
Returns{ config: |
static withSliderTickMarks() | ||||||
|---|---|---|---|---|---|---|
Slider with tick marks Use when testing tick mark display | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withTabIndex() | |||||||||
|---|---|---|---|---|---|---|---|---|---|
Single field with tabIndex Use when testing tab order | |||||||||
Presentation | |||||||||
Parameters
Returns{ config: |
static withToggle() |
|---|
Single toggle Use when testing toggle rendering |
Presentation |
Returns{ config: |
static withToggleColor() | ||||||
|---|---|---|---|---|---|---|
Toggle with color Use when testing Material color theme | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withToggleLabelPosition() | ||||||
|---|---|---|---|---|---|---|
Toggle with label position Use when testing toggle label positioning | ||||||
Presentation | ||||||
Parameters
Returns{ config: |
static withValue() | ||||||
|---|---|---|---|---|---|---|
Single field with initial value Use when testing value binding and updates | ||||||
Presentation | ||||||
Parameters
Returns{ config: |