Files
omarchy/plugins/io.github.elevate08.qs-bitwarden-cli/tests/qml/tst_ssh_items.qml
T
asepharyana 1cdb82a76f Sync config from arch
- hypr/apps.lua
- hypr/autostart.lua
- hypr/envs.lua
- hypr/hyprland.lua
- hypr/hyprsunset.conf
- hypr/input.lua
- hypr/looknfeel.lua
- hypr/omasettings.lua
- hypr/xdph.conf
- omarchy/branding/about.txt
- omarchy/branding/screensaver.txt
- omarchy/extensions/omarchy-menu.jsonc
- omarchy/hooks/battery-low.d/play-warning-sound.sample
- omarchy/hooks/font-set.d/show-font-notification.sample
- omarchy/hooks/post-boot.d/weather.sample
- omarchy/hooks/post-update.d/install-voxtype.hook
- omarchy/hooks/post-update.d/setup-agent.hook
- omarchy/hooks/post-update.d/setup-fingerprint.hook
- omarchy/hooks/post-update.d/show-update-notification.sample
- omarchy/hooks/pre-refresh-pacman.d/add-custom-repo.sample
- omarchy/hooks/theme-set.d/show-theme-notification.sample
- omarchy/shell.json
- omarchy/shell.toml
- omarchy/theme.name
- omarchy/themes/azure-glow/README.md
- omarchy/themes/azure-glow/alacritty.toml
- omarchy/themes/azure-glow/btop.theme
- omarchy/themes/azure-glow/hyprland.conf
- omarchy/themes/azure-glow/hyprlock.conf
- omarchy/themes/azure-glow/icons.theme
- … 269 more
2026-09-23 15:19:12 +07:00

27 lines
1009 B
QML

import QtQuick
import QtTest
import "../../BitwardenModel.js" as Model
TestCase {
name: "SshItems"
function test_sanitized_items_are_filterable_and_public() {
var items = Model.parseSanitizedItems(JSON.stringify({
items: [{ id: "login", type: 1, name: "Login", login: { username: "u" } }],
sshKeys: [{ id: "ssh", type: 5, name: "Deploy", favorite: true,
sshKey: { publicKey: "ssh-ed25519 AAAA", fingerprint: "SHA256:fp" } }]
}))
compare(items.length, 2)
compare(Model.filterItems(items, "AAAA", "all", "all", "all").length, 1)
compare(Model.filterItems(items, "", "sshKey", "all", "all")[0].id, "ssh")
verify(Model.itemDetailFromObject(items[1].rawObject).password === "")
}
function test_ssh_generic_actions_fail_closed() {
compare(Model.buildCreatePayload(5, "Deploy"), null)
compare(Model.getItemCommand("ssh", 5).length, 0)
compare(Model.editItemCommand("ssh", 5).length, 0)
compare(Model.deleteItemCommand("ssh", 5).length, 0)
}
}