mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 00:56:16 +00:00
Wires the device-side state the reporter described in https://github.com/gesellix/Bose-SoundTouch/issues/234 into the fakespeaker via FixtureOverrides, and exercises GetLiveDeviceInfo + syncSources against it. The factory-reset state has two observable signals: - `/info` returns an empty `<margeAccountUUID/>` because Marge.xml is missing from the persistence partition. AfterTouch's "is the device paired?" check at setup.go:632 keys on AccountID, so this is the canonical "needs re-pairing" signal. - `/sources` lists only AUX, BLUETOOTH, AIRPLAY, the SpotifyConnectUserName placeholder, NOTIFICATION, and QPLAY — TUNEIN, LOCAL_INTERNET_RADIO, and any post-pairing Spotify accounts are gone until the speaker is nudged with a `<sourcesUpdated/>` notification or re-pairs. Today AfterTouch has no auto-recovery for either signal — it just passes the state through. The test locks in that contract by asserting: - GetLiveDeviceInfo reports an empty MargeAccountUUID, - persisted Sources.xml contains AUX/BLUETOOTH/AIRPLAY sourceKeys, - persisted Sources.xml does NOT contain TUNEIN/LOCAL_INTERNET_RADIO. When auto-recovery lands (e.g. an automatic POST of the sourcesUpdated notification during sync, or marge-side source replenishment), the absence assertions will flip — at which point update them to assert the survivors are *present*, and adjust the doc-comment so the contract stays in sync with the code. Pattern mirrors pkg/service/setup/issue218_regression_test.go: a testdata fixture next to the test, fakespeaker driven via Config.FixtureOverrides, doc-comment naming what would have to change for the assertion to flip. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 lines
822 B
XML
10 lines
822 B
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<sources deviceID="DEADBEEFCAFE">
|
|
<sourceItem source="AUX" sourceAccount="AUX" status="READY" isLocal="true" multiroomallowed="true">AUX IN</sourceItem>
|
|
<sourceItem source="BLUETOOTH" status="UNAVAILABLE" isLocal="true" multiroomallowed="true"/>
|
|
<sourceItem source="AIRPLAY" status="UNAVAILABLE" isLocal="false" multiroomallowed="false"/>
|
|
<sourceItem source="SPOTIFY" sourceAccount="SpotifyConnectUserName" status="UNAVAILABLE" isLocal="false" multiroomallowed="true">SpotifyConnectUserName</sourceItem>
|
|
<sourceItem source="NOTIFICATION" status="UNAVAILABLE" isLocal="false" multiroomallowed="true"/>
|
|
<sourceItem source="QPLAY" sourceAccount="QPlay1UserName" status="UNAVAILABLE" isLocal="true" multiroomallowed="true">QPlay1UserName</sourceItem>
|
|
</sources>
|