(t *testing.T)
| 337 | } |
| 338 | |
| 339 | func TestFormAppendItems_FocusStability(t *testing.T) { |
| 340 | form := NewForm("Done", |
| 341 | FormItem{Label: "First", Field: NewTextField("first")}, |
| 342 | FormItem{Label: "Second", Field: NewTextField("second")}, |
| 343 | ) |
| 344 | formPressTab(&form) |
| 345 | assert.Equal(t, 1, form.Focused()) |
| 346 | |
| 347 | form.AppendItems(FormItem{Label: "Third", Field: NewTextField("third")}) |
| 348 | assert.Equal(t, 1, form.Focused(), "focus unchanged after append") |
| 349 | } |
| 350 | |
| 351 | // Helpers |
| 352 |
nothing calls this directly
no test coverage detected
searching dependent graphs…