(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestForm_EnterAdvancesFocus(t *testing.T) { |
| 50 | form := NewForm("Submit", |
| 51 | FormItem{Label: "First", Field: NewTextField("first")}, |
| 52 | FormItem{Label: "Second", Field: NewTextField("second")}, |
| 53 | ) |
| 54 | |
| 55 | formPressEnter(&form) |
| 56 | assert.Equal(t, 1, form.Focused()) |
| 57 | |
| 58 | formPressEnter(&form) |
| 59 | assert.Equal(t, 2, form.Focused(), "submit button") |
| 60 | } |
| 61 | |
| 62 | func TestForm_SubmitAction(t *testing.T) { |
| 63 | form := NewForm("Done", |
nothing calls this directly
no test coverage detected
searching dependent graphs…