mirror of
https://github.com/shokinn/hosts-go.git
synced 2025-08-23 08:33:02 +00:00
Update key bindings to match project brief
This commit is contained in:
parent
9af4c54d1e
commit
ecb7a1ab93
4 changed files with 9 additions and 8 deletions
|
@ -72,12 +72,12 @@ func TestEditModeToggleAndActivation(t *testing.T) {
|
|||
m := tui.NewModel(hf)
|
||||
|
||||
// enter edit mode
|
||||
nm, _ := m.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'e'}})
|
||||
nm, _ := m.Update(tea.KeyMsg{Type: tea.KeyCtrlE})
|
||||
m = nm.(tui.Model)
|
||||
assert.Equal(t, tui.EditMode, m.Mode())
|
||||
|
||||
// toggle active state of first entry
|
||||
nm, _ = m.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'a'}})
|
||||
nm, _ = m.Update(tea.KeyMsg{Type: tea.KeySpace})
|
||||
m = nm.(tui.Model)
|
||||
assert.False(t, m.SelectedEntry().Active)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue