Fix launcher entry removal
This commit is contained in:
@@ -5,7 +5,9 @@ set -euo pipefail
|
||||
source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh"
|
||||
|
||||
run_node_test <<'JS'
|
||||
const fs = require('fs')
|
||||
const search = requireFromRoot('shell/plugins/launcher/LauncherSearch.js')
|
||||
const launcherQml = fs.readFileSync(path.join(root, 'shell/plugins/launcher/Launcher.qml'), 'utf8')
|
||||
|
||||
const entries = [
|
||||
{
|
||||
@@ -65,4 +67,11 @@ assertEqual(acronymMatches[0], 'Google Contacts', 'short acronym matching still
|
||||
|
||||
const directMatches = search.sortedEntries(entries, 'obs').map(row => search.entryName(row.entry))
|
||||
assertEqual(directMatches[0], 'OBS Studio', 'direct app-name matching still works')
|
||||
|
||||
const confirmDeleteMatch = launcherQml.match(/function confirmDelete\(\) \{([\s\S]*?)\n \}/)
|
||||
assert(confirmDeleteMatch, 'launcher confirmDelete function exists')
|
||||
assert(
|
||||
!confirmDeleteMatch[1].includes('root.dismiss()'),
|
||||
'launcher delete keeps launcher open after confirmation'
|
||||
)
|
||||
JS
|
||||
|
||||
Reference in New Issue
Block a user