setupViews creates a few views and does an initial full flush so all views start in a clean (non-tainted) state.
(t *testing.T, g *Gui)
| 23 | // setupViews creates a few views and does an initial full flush so all views |
| 24 | // start in a clean (non-tainted) state. |
| 25 | func setupViews(t *testing.T, g *Gui) (*View, *View) { |
| 26 | t.Helper() |
| 27 | |
| 28 | status, _ := g.SetView("status", 0, 22, 40, 24, 0) |
| 29 | status.Frame = false |
| 30 | main, _ := g.SetView("main", 0, 0, 80, 22, 0) |
| 31 | |
| 32 | // Initial content |
| 33 | status.SetContent("Ready") |
| 34 | main.SetContent("hello world") |
| 35 | |
| 36 | // Full flush to draw everything and clear tainted flags |
| 37 | assert.NoError(t, g.flush()) |
| 38 | |
| 39 | return status, main |
| 40 | } |
| 41 | |
| 42 | // pushContentOnly pushes a content-only event directly to the channel |
| 43 | // (synchronous, deterministic — unlike Update which spawns a goroutine). |
no test coverage detected