/* ── the playlist export, three ways ────────────────────────────── On the provisioned device the block above deliberately put back, and on the pristine fixture its reload restored. The file is built in Rust by the desktop's own writers and written by whichever door the platform has, so the only thing that comes back — and the only thing the phone can show — is where it went. */ { do: `document.querySelectorAll('.nav button')[2].click()`, wait: 800 }, { do: `__click('.segtabs button', 'Playlists')`, wait: 800 }, { do: `__click('.plgrid .release', 'Late night drive')`, name: "export-open", wait: 1200 }, { do: `document.querySelectorAll('.gbar .iconbtn')[1].click()`, wait: 700 }, { do: `__click('.halfsheet .row', 'Export')`, name: "export-sheet", wait: 800 }, { do: `__click('.halfsheet .row', 'CSV')`, name: "export-written", wait: 1000 }, /* a sheet dismissed: the command answers null and the phone says nothing, because nothing happened. The notice from the step above is cleared by hand rather than waited out — note() lives 3.2 s, longer than any wait here, and a wait that had to outlast it would be the fragile kind. */ { do: `__ssMock.answer('playlist_export', null); __ss.notice.text = ''; true`, wait: 300 }, { do: `document.querySelectorAll('.gbar .iconbtn')[1].click()`, wait: 700 }, { do: `__click('.halfsheet .row', 'Export')`, wait: 700 }, { do: `__click('.halfsheet .row', 'M3U8')`, name: "export-cancelled", wait: 1000 }, /* and a refusal — what Android answers when the document is somewhere the app cannot write — read back as a sentence rather than as Rust */ { do: `__ssMock.forget('playlist_export'); __ssMock.fail('playlist_export', 'permission denied (os error 13)'); true`, wait: 300 }, { do: `document.querySelectorAll('.gbar .iconbtn')[1].click()`, wait: 700 }, { do: `__click('.halfsheet .row', 'Export')`, wait: 700 }, { do: `__click('.halfsheet .row', 'Backup (JSON)')`, name: "export-refused", wait: 1200 }, { do: `__ssMock.clear(); __ss.player.error = ''; __ss.lib.error = ''; history.back(); true`, wait: 900 }, { do: `document.querySelectorAll('.nav button')[0].click()`, name: "export-clear", wait: 900 },