Name of the widget (will be normalized to kebab-case)
Object with methods to generate scoped test IDs
const COST_IDS = createWidgetTestId('cost-estimation');
COST_IDS.root // 'widget-cost-estimation'
COST_IDS.section('capex') // 'widget-cost-estimation-section-capex'
COST_IDS.button('submit') // 'widget-cost-estimation-button-submit'
COST_IDS.value('total') // 'widget-cost-estimation-value-total'
COST_IDS.label('amount') // 'widget-cost-estimation-label-amount'
COST_IDS.header() // 'widget-cost-estimation-header'
COST_IDS.header('main') // 'widget-cost-estimation-header-main'
Widget-scoped test ID generator factory Creates a factory object with methods to generate consistent test IDs for all elements within a widget.