test: fix tests for MacOS, closes #61

(I think) due to differences Backspace/Delete is handled in MacOS as compared to Linux/Windows, some tests were failing.
`oxker` default keymap doesn’t use Backspace or Delete, but a note has been added to the function in case it ever comes up again in the future.
This commit is contained in:
Jack Wills
2025-04-22 15:03:24 +00:00
parent e158522fd0
commit cfc2decd8d
5 changed files with 13 additions and 10 deletions
+4 -4
View File
@@ -581,7 +581,7 @@ mod tests {
sort_by_id: (KeyCode::Char('/'), None),
sort_by_image: (KeyCode::Char(','), None),
sort_by_rx: (KeyCode::Char('.'), None),
sort_by_tx: (KeyCode::Backspace, None),
sort_by_tx: (KeyCode::Insert, None),
sort_reset: (KeyCode::Up, None),
toggle_help: (KeyCode::Home, None),
toggle_mouse_capture: (KeyCode::PageDown, None),
@@ -626,9 +626,9 @@ mod tests {
sort_by_id: (KeyCode::Char('/'), Some(KeyCode::Char('='))),
sort_by_image: (KeyCode::Char(','), Some(KeyCode::Char('\\'))),
sort_by_rx: (KeyCode::Char('.'), Some(KeyCode::Char(']'))),
sort_by_tx: (KeyCode::Backspace, Some(KeyCode::BackTab)),
sort_by_tx: (KeyCode::Insert, Some(KeyCode::BackTab)),
sort_reset: (KeyCode::Up, Some(KeyCode::Down)),
toggle_help: (KeyCode::Home, Some(KeyCode::Delete)),
toggle_help: (KeyCode::Home, Some(KeyCode::End)),
toggle_mouse_capture: (KeyCode::PageDown, Some(KeyCode::PageUp)),
};
@@ -671,7 +671,7 @@ mod tests {
sort_by_id: (KeyCode::Char('/'), Some(KeyCode::Char('='))),
sort_by_image: (KeyCode::Char(','), None),
sort_by_rx: (KeyCode::Char('.'), Some(KeyCode::Char(']'))),
sort_by_tx: (KeyCode::Backspace, None),
sort_by_tx: (KeyCode::Insert, None),
sort_reset: (KeyCode::Up, Some(KeyCode::Down)),
toggle_help: (KeyCode::Home, None),
toggle_mouse_capture: (KeyCode::PageDown, Some(KeyCode::PageUp)),
@@ -39,7 +39,7 @@ expression: setup.terminal.backend()
" │ ( / ) sort containers by id │ "
" │ ( , ) sort containers by image │ "
" │ ( . ) sort containers by rx │ "
" │ ( Backspace ) sort containers by tx │ "
" │ ( Insert ) sort containers by tx │ "
" │ ( a ) close dialog │ "
" │ ( k ) quit at any time │ "
" │ │ "
@@ -26,7 +26,7 @@ expression: setup.terminal.backend()
" │ ( u ) or ( v ) scroll list to start │ "
" │ ( enter ) send docker container command │ "
" │ ( g ) or ( h ) exec into a container │ "
" │ ( Home ) or ( Del ) toggle this help information - or click heading │ "
" │ ( Home ) or ( End ) toggle this help information - or click heading │ "
" │ ( m ) or ( n ) save logs to file │ "
" │ ( Page Down ) or ( Page Up ) toggle mouse capture - if disabled, text on screen can be selected & copied │ "
" │ ( i ) or ( j ) enter filter mode │ "
@@ -39,7 +39,7 @@ expression: setup.terminal.backend()
" │ ( / ) or ( = ) sort containers by id │ "
" │ ( , ) or ( \ ) sort containers by image │ "
" │ ( . ) or ( ] ) sort containers by rx │ "
" │ ( Backspace ) or ( Back Tab ) sort containers by tx │ "
" │ ( Insert ) or ( Back Tab ) sort containers by tx │ "
" │ ( a ) or ( b ) close dialog │ "
" │ ( k ) or ( l ) quit at any time │ "
" │ │ "
@@ -39,7 +39,7 @@ expression: setup.terminal.backend()
" │ ( / ) or ( = ) sort containers by id │ "
" │ ( , ) sort containers by image │ "
" │ ( . ) or ( ] ) sort containers by rx │ "
" │ ( Backspace ) sort containers by tx │ "
" │ ( Insert ) sort containers by tx │ "
" │ ( a ) or ( b ) close dialog │ "
" │ ( k ) quit at any time │ "
" │ │ "