Avoid visual Phone harness teardown
This commit is contained in:
@@ -4,6 +4,8 @@ set -euo pipefail
|
||||
|
||||
project_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
phone_controls="$project_root/config/dot/quickshell/modules/quicksettings/PhoneControls.qml"
|
||||
phone_actions="$project_root/config/dot/quickshell/modules/quicksettings/PhoneActions.qml"
|
||||
quicksettings_qmldir="$project_root/config/dot/quickshell/modules/quicksettings/qmldir"
|
||||
system_settings="$project_root/config/dot/quickshell/services/SystemSettings.qml"
|
||||
harness="$project_root/config/dot/quickshell/phone-controls-harness.qml"
|
||||
kde_fixture="$project_root/tests/quickshell/fixtures/PhoneControlsKdeConnect.qml"
|
||||
@@ -17,11 +19,24 @@ fail() {
|
||||
}
|
||||
|
||||
[[ -f "$phone_controls" ]] || fail 'Phone controls component is missing'
|
||||
[[ -f "$phone_actions" ]] || fail 'Nonvisual Phone actions component is missing'
|
||||
[[ -f "$system_settings" ]] || fail 'System settings service is missing'
|
||||
[[ -f "$harness" ]] || fail 'Phone controls runtime harness is missing'
|
||||
[[ -f "$kde_fixture" ]] || fail 'Phone controls KDE fixture is missing'
|
||||
[[ -f "$settings_fixture" ]] || fail 'Phone controls System Settings fixture is missing'
|
||||
|
||||
rg -Fq 'PhoneActions 1.0 PhoneActions.qml' "$quicksettings_qmldir" \
|
||||
|| fail 'Phone actions component is not registered'
|
||||
rg -Fq 'PhoneActions {' "$phone_controls" \
|
||||
|| fail 'Phone controls do not consume the shared action model'
|
||||
rg -Fq 'readonly property var actionModels: phoneActions.actionModels' "$phone_controls" \
|
||||
|| fail 'Phone controls do not render the shared action models'
|
||||
rg -Fq 'PhoneActions {' "$harness" \
|
||||
|| fail 'Runtime harness does not use the nonvisual action model'
|
||||
if rg -Fq 'PhoneControls {' "$harness"; then
|
||||
fail 'Runtime harness still instantiates the visual Phone controls tree'
|
||||
fi
|
||||
|
||||
cleanup() {
|
||||
XDG_STATE_HOME="$state_home" QS_DISABLE_CRASH_HANDLER=1 \
|
||||
qs -p "$config_path/phone-controls-harness.qml" kill >/dev/null 2>&1 || true
|
||||
@@ -76,11 +91,11 @@ rg -Fq 'command: ["flatpak", "info", "app.bluebubbles.BlueBubbles"]' "$system_se
|
||||
|| fail 'BlueBubbles installed-state probe is missing'
|
||||
|
||||
for action in share clipboard ring messages; do
|
||||
rg -Fq "id: \"$action\"" "$phone_controls" \
|
||||
rg -Fq "id: \"$action\"" "$phone_actions" \
|
||||
|| fail "Phone actions do not include $action"
|
||||
done
|
||||
|
||||
if rg -Fq '.filter(' "$phone_controls"; then
|
||||
if rg -Fq '.filter(' "$phone_actions"; then
|
||||
fail 'Phone actions are filtered instead of keeping four stable columns'
|
||||
fi
|
||||
rg -Fq 'columns: 4' "$phone_controls" \
|
||||
@@ -93,7 +108,7 @@ rg -Fq 'KdeConnect.phoneReachable' "$phone_controls" \
|
||||
|| fail 'KDE action reachability semantics are missing'
|
||||
rg -Fq 'function actionEnabled(action: string): bool' "$phone_controls" \
|
||||
|| fail 'Phone controls do not expose action enablement'
|
||||
rg -Fq 'KdeConnect.supports(action)' "$phone_controls" \
|
||||
rg -Fq 'KdeConnect.supports(action)' "$phone_actions" \
|
||||
|| fail 'KDE action capability semantics are missing'
|
||||
rg -Fq 'else if (action === "messages")' "$phone_controls" \
|
||||
|| fail 'Messages has no independent invocation branch'
|
||||
|
||||
Reference in New Issue
Block a user