fix(discovery): update page keybindings
This commit is contained in:
1 parent
1742f62cd0
commit
e14075ad8d
11 files changed
+87
-31
No files matched your search
@@ -43,7 +43,19 @@ fn modpack_discovery_renders_active_search() {
|
||||
.draw(|frame| render_with_picker(frame, frame.area(), FocusedArea::ImportPopup, &picker))
|
||||
.unwrap();
|
||||
|
||||
assert!(format!("{}", terminal.backend()).contains("/ fabric\u{2588}"));
|
||||
let rendered = format!("{}", terminal.backend());
|
||||
assert!(rendered.contains("/ fabric\u{2588}"));
|
||||
assert!(rendered.contains("[v] versions"));
|
||||
assert!(rendered.contains("[i] import"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn modpack_project_page_only_shows_page_actions() {
|
||||
let hints = discovery_keybinds(true);
|
||||
|
||||
assert!(hints.contains(&("v", " versions")));
|
||||
assert!(!hints.iter().any(|(_, action)| *action == " search"));
|
||||
assert!(!hints.iter().any(|(_, action)| *action == " import"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
source: src/tui/tests/widgets/popups/import_modpack/render.rs
|
||||
expression: terminal.backend()
|
||||
---
|
||||
"╭Direct Modpack Import─────────────────────────────────────╮"
|
||||
"╭Import Modpack────────────────────────────────────────────╮"
|
||||
"│Name: Synthetic Pack │"
|
||||
"│Pack Version: 1.0.0 │"
|
||||
"│MC Version: 1.20.1 │"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
source: src/tui/tests/widgets/popups/import_modpack/render.rs
|
||||
expression: terminal.backend()
|
||||
---
|
||||
"╭Direct Modpack Import─────────────────────────────────────╮"
|
||||
"╭Import Modpack────────────────────────────────────────────╮"
|
||||
"│Name: Vanilla Pack │"
|
||||
"│Pack Version: 2.0 │"
|
||||
"│MC Version: 1.20.1 │"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
source: src/tui/tests/widgets/popups/import_modpack/render.rs
|
||||
expression: terminal.backend()
|
||||
---
|
||||
"╭Direct Modpack Import─────────────────────────────────────╮"
|
||||
"╭Import Modpack────────────────────────────────────────────╮"
|
||||
"│Fetching modpack info... │"
|
||||
"│ │"
|
||||
"│ │"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
source: src/tui/tests/widgets/popups/import_modpack/render.rs
|
||||
expression: terminal.backend()
|
||||
---
|
||||
"╭Direct Modpack Import─────────────────────────────────────╮"
|
||||
"╭Import Modpack────────────────────────────────────────────╮"
|
||||
"│URL, slug, or pack file path...█ │"
|
||||
"│ │"
|
||||
"│ │"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
source: src/tui/tests/widgets/popups/import_modpack/render.rs
|
||||
expression: terminal.backend()
|
||||
---
|
||||
"╭Direct Modpack Import─────────────────────────────────────╮"
|
||||
"╭Import Modpack────────────────────────────────────────────╮"
|
||||
"│▶ 1.0.0 1.20.1 fabric │"
|
||||
"│ 0.9.0 1.20.1 fabric │"
|
||||
"│ │"
|
||||
|
||||
Reference in new issue
Block a user