feat(core): Add Quicklist function to return all visible via ctrl+Q.
Some checks failed
CI / Check (macos-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Clippy (strict) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
Some checks failed
CI / Check (macos-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Clippy (strict) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
This commit is contained in:
@@ -11,6 +11,7 @@ use serde_json::Value;
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum OutputAction {
|
||||
Select,
|
||||
Quicklist,
|
||||
Cancel,
|
||||
}
|
||||
|
||||
@@ -94,6 +95,18 @@ mod tests {
|
||||
assert_eq!(json["action"], "cancel");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn output_item_quicklist_action() {
|
||||
let item = OutputItem {
|
||||
value: json!("test"),
|
||||
action: OutputAction::Quicklist,
|
||||
index: 2,
|
||||
};
|
||||
let json = serde_json::to_value(&item).unwrap_or_default();
|
||||
assert_eq!(json["action"], "quicklist");
|
||||
assert_eq!(json["index"], 2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn output_item_string_contains_value_text() {
|
||||
let item = OutputItem {
|
||||
|
||||
Reference in New Issue
Block a user