@@ -1198,7 +1198,7 @@ describe('ViewConfigPanel', () => {
11981198
11991199 // ── User actions fields tests ──
12001200
1201- it ( 'renders new user action fields: editRecordsInline , addDeleteRecordsInline, and navigation mode select' , ( ) => {
1201+ it ( 'renders new user action fields: inlineEdit , addDeleteRecordsInline, and navigation mode select' , ( ) => {
12021202 render (
12031203 < ViewConfigPanel
12041204 open = { true }
@@ -1208,12 +1208,12 @@ describe('ViewConfigPanel', () => {
12081208 />
12091209 ) ;
12101210
1211- expect ( screen . getByTestId ( 'toggle-editRecordsInline ' ) ) . toBeInTheDocument ( ) ;
1211+ expect ( screen . getByTestId ( 'toggle-inlineEdit ' ) ) . toBeInTheDocument ( ) ;
12121212 expect ( screen . getByTestId ( 'toggle-addDeleteRecordsInline' ) ) . toBeInTheDocument ( ) ;
12131213 expect ( screen . getByTestId ( 'select-navigation-mode' ) ) . toBeInTheDocument ( ) ;
12141214 } ) ;
12151215
1216- it ( 'toggles editRecordsInline via Switch (maps to inlineEdit) ' , ( ) => {
1216+ it ( 'toggles inlineEdit via Switch' , ( ) => {
12171217 const onViewUpdate = vi . fn ( ) ;
12181218 render (
12191219 < ViewConfigPanel
@@ -1225,7 +1225,7 @@ describe('ViewConfigPanel', () => {
12251225 />
12261226 ) ;
12271227
1228- fireEvent . click ( screen . getByTestId ( 'toggle-editRecordsInline ' ) ) ;
1228+ fireEvent . click ( screen . getByTestId ( 'toggle-inlineEdit ' ) ) ;
12291229 expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'inlineEdit' , false ) ;
12301230 } ) ;
12311231
@@ -1520,7 +1520,7 @@ describe('ViewConfigPanel', () => {
15201520 expect ( screen . getByText ( 'console.objectView.listConfigHint' ) ) . toBeInTheDocument ( ) ;
15211521 } ) ;
15221522
1523- it ( 'renders list-level inline action items in the User Actions section (editRecordsInline , addDeleteRecordsInline)' , ( ) => {
1523+ it ( 'renders list-level inline action items in the User Actions section (inlineEdit , addDeleteRecordsInline)' , ( ) => {
15241524 render (
15251525 < ViewConfigPanel
15261526 open = { true }
@@ -1531,7 +1531,7 @@ describe('ViewConfigPanel', () => {
15311531 ) ;
15321532
15331533 // List-level inline actions should be in the User Actions collapsible section
1534- expect ( screen . getByTestId ( 'toggle-editRecordsInline ' ) ) . toBeInTheDocument ( ) ;
1534+ expect ( screen . getByTestId ( 'toggle-inlineEdit ' ) ) . toBeInTheDocument ( ) ;
15351535 expect ( screen . getByTestId ( 'toggle-addDeleteRecordsInline' ) ) . toBeInTheDocument ( ) ;
15361536 } ) ;
15371537
@@ -2150,4 +2150,184 @@ describe('ViewConfigPanel', () => {
21502150 fireEvent . click ( screen . getByTestId ( 'row-height-tall' ) ) ;
21512151 expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'rowHeight' , 'tall' ) ;
21522152 } ) ;
2153+
2154+ // ── Interaction tests for emptyState, ARIA, rowActions, bulkActions, showRecordCount, allowPrinting, virtualScroll ──
2155+
2156+ it ( 'updates emptyState title via input and calls onViewUpdate' , ( ) => {
2157+ const onViewUpdate = vi . fn ( ) ;
2158+ render (
2159+ < ViewConfigPanel
2160+ open = { true }
2161+ onClose = { vi . fn ( ) }
2162+ activeView = { mockActiveView }
2163+ objectDef = { mockObjectDef }
2164+ onViewUpdate = { onViewUpdate }
2165+ />
2166+ ) ;
2167+
2168+ fireEvent . change ( screen . getByTestId ( 'input-emptyState-title' ) , { target : { value : 'No data' } } ) ;
2169+ expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'emptyState' , expect . objectContaining ( { title : 'No data' } ) ) ;
2170+ } ) ;
2171+
2172+ it ( 'updates emptyState message via input and calls onViewUpdate' , ( ) => {
2173+ const onViewUpdate = vi . fn ( ) ;
2174+ render (
2175+ < ViewConfigPanel
2176+ open = { true }
2177+ onClose = { vi . fn ( ) }
2178+ activeView = { mockActiveView }
2179+ objectDef = { mockObjectDef }
2180+ onViewUpdate = { onViewUpdate }
2181+ />
2182+ ) ;
2183+
2184+ fireEvent . change ( screen . getByTestId ( 'input-emptyState-message' ) , { target : { value : 'Try adding records' } } ) ;
2185+ expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'emptyState' , expect . objectContaining ( { message : 'Try adding records' } ) ) ;
2186+ } ) ;
2187+
2188+ it ( 'updates emptyState icon via input and calls onViewUpdate' , ( ) => {
2189+ const onViewUpdate = vi . fn ( ) ;
2190+ render (
2191+ < ViewConfigPanel
2192+ open = { true }
2193+ onClose = { vi . fn ( ) }
2194+ activeView = { mockActiveView }
2195+ objectDef = { mockObjectDef }
2196+ onViewUpdate = { onViewUpdate }
2197+ />
2198+ ) ;
2199+
2200+ fireEvent . change ( screen . getByTestId ( 'input-emptyState-icon' ) , { target : { value : 'inbox' } } ) ;
2201+ expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'emptyState' , expect . objectContaining ( { icon : 'inbox' } ) ) ;
2202+ } ) ;
2203+
2204+ it ( 'updates ARIA label via input and calls onViewUpdate' , ( ) => {
2205+ const onViewUpdate = vi . fn ( ) ;
2206+ render (
2207+ < ViewConfigPanel
2208+ open = { true }
2209+ onClose = { vi . fn ( ) }
2210+ activeView = { mockActiveView }
2211+ objectDef = { mockObjectDef }
2212+ onViewUpdate = { onViewUpdate }
2213+ />
2214+ ) ;
2215+
2216+ fireEvent . change ( screen . getByTestId ( 'input-aria-label' ) , { target : { value : 'Contacts table' } } ) ;
2217+ expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'aria' , expect . objectContaining ( { label : 'Contacts table' } ) ) ;
2218+ } ) ;
2219+
2220+ it ( 'updates ARIA describedBy via input and calls onViewUpdate' , ( ) => {
2221+ const onViewUpdate = vi . fn ( ) ;
2222+ render (
2223+ < ViewConfigPanel
2224+ open = { true }
2225+ onClose = { vi . fn ( ) }
2226+ activeView = { mockActiveView }
2227+ objectDef = { mockObjectDef }
2228+ onViewUpdate = { onViewUpdate }
2229+ />
2230+ ) ;
2231+
2232+ fireEvent . change ( screen . getByTestId ( 'input-aria-describedBy' ) , { target : { value : 'table-desc' } } ) ;
2233+ expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'aria' , expect . objectContaining ( { describedBy : 'table-desc' } ) ) ;
2234+ } ) ;
2235+
2236+ it ( 'changes ARIA live region and calls onViewUpdate' , ( ) => {
2237+ const onViewUpdate = vi . fn ( ) ;
2238+ render (
2239+ < ViewConfigPanel
2240+ open = { true }
2241+ onClose = { vi . fn ( ) }
2242+ activeView = { mockActiveView }
2243+ objectDef = { mockObjectDef }
2244+ onViewUpdate = { onViewUpdate }
2245+ />
2246+ ) ;
2247+
2248+ fireEvent . change ( screen . getByTestId ( 'select-aria-live' ) , { target : { value : 'polite' } } ) ;
2249+ expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'aria' , expect . objectContaining ( { live : 'polite' } ) ) ;
2250+ } ) ;
2251+
2252+ it ( 'updates rowActions via input and calls onViewUpdate' , ( ) => {
2253+ const onViewUpdate = vi . fn ( ) ;
2254+ render (
2255+ < ViewConfigPanel
2256+ open = { true }
2257+ onClose = { vi . fn ( ) }
2258+ activeView = { mockActiveView }
2259+ objectDef = { mockObjectDef }
2260+ onViewUpdate = { onViewUpdate }
2261+ />
2262+ ) ;
2263+
2264+ fireEvent . click ( screen . getByText ( 'console.objectView.rowActions' ) ) ;
2265+ fireEvent . change ( screen . getByTestId ( 'input-rowActions' ) , { target : { value : 'edit, delete' } } ) ;
2266+ expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'rowActions' , [ 'edit' , 'delete' ] ) ;
2267+ } ) ;
2268+
2269+ it ( 'updates bulkActions via input and calls onViewUpdate' , ( ) => {
2270+ const onViewUpdate = vi . fn ( ) ;
2271+ render (
2272+ < ViewConfigPanel
2273+ open = { true }
2274+ onClose = { vi . fn ( ) }
2275+ activeView = { mockActiveView }
2276+ objectDef = { mockObjectDef }
2277+ onViewUpdate = { onViewUpdate }
2278+ />
2279+ ) ;
2280+
2281+ fireEvent . click ( screen . getByText ( 'console.objectView.bulkActions' ) ) ;
2282+ fireEvent . change ( screen . getByTestId ( 'input-bulkActions' ) , { target : { value : 'delete, export' } } ) ;
2283+ expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'bulkActions' , [ 'delete' , 'export' ] ) ;
2284+ } ) ;
2285+
2286+ it ( 'toggles showRecordCount and calls onViewUpdate' , ( ) => {
2287+ const onViewUpdate = vi . fn ( ) ;
2288+ render (
2289+ < ViewConfigPanel
2290+ open = { true }
2291+ onClose = { vi . fn ( ) }
2292+ activeView = { mockActiveView }
2293+ objectDef = { mockObjectDef }
2294+ onViewUpdate = { onViewUpdate }
2295+ />
2296+ ) ;
2297+
2298+ fireEvent . click ( screen . getByTestId ( 'toggle-showRecordCount' ) ) ;
2299+ expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'showRecordCount' , true ) ;
2300+ } ) ;
2301+
2302+ it ( 'toggles allowPrinting and calls onViewUpdate' , ( ) => {
2303+ const onViewUpdate = vi . fn ( ) ;
2304+ render (
2305+ < ViewConfigPanel
2306+ open = { true }
2307+ onClose = { vi . fn ( ) }
2308+ activeView = { mockActiveView }
2309+ objectDef = { mockObjectDef }
2310+ onViewUpdate = { onViewUpdate }
2311+ />
2312+ ) ;
2313+
2314+ fireEvent . click ( screen . getByTestId ( 'toggle-allowPrinting' ) ) ;
2315+ expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'allowPrinting' , true ) ;
2316+ } ) ;
2317+
2318+ it ( 'toggles virtualScroll and calls onViewUpdate' , ( ) => {
2319+ const onViewUpdate = vi . fn ( ) ;
2320+ render (
2321+ < ViewConfigPanel
2322+ open = { true }
2323+ onClose = { vi . fn ( ) }
2324+ activeView = { mockActiveView }
2325+ objectDef = { mockObjectDef }
2326+ onViewUpdate = { onViewUpdate }
2327+ />
2328+ ) ;
2329+
2330+ fireEvent . click ( screen . getByTestId ( 'toggle-virtualScroll' ) ) ;
2331+ expect ( onViewUpdate ) . toHaveBeenCalledWith ( 'virtualScroll' , true ) ;
2332+ } ) ;
21532333} ) ;
0 commit comments