Report phone playback metadata once per browser session
This commit is contained in:
@@ -61,3 +61,13 @@ test('saved deletion is confirmed and a storage failure retains the file',async(
|
||||
await page.locator('#listFilterInput').fill('extended');
|
||||
await expect(page.locator('.saved-card')).toHaveCount(1);
|
||||
});
|
||||
test('actual device playback reports metadata once without requesting streams',async({page})=>{
|
||||
await openClassic(page);
|
||||
const reports=[];await page.route('**/api/media/*/meta',route=>{reports.push(route.request().postDataJSON());return route.fulfill({contentType:'application/json',body:'{"ok":true,"known":false,"cache":"queued"}'});});
|
||||
await page.evaluate(()=>{
|
||||
current={meta:{id:'0gfX0dFLaBc',title:'Phone saved song',channel:'Phone artist',duration:240},qualities:[]};
|
||||
Player.master=els.audio;Player.secondary=null;
|
||||
els.audio.dispatchEvent(new Event('playing'));els.audio.dispatchEvent(new Event('playing'));
|
||||
});
|
||||
await expect.poll(()=>reports.length).toBe(1);expect(reports[0]).toMatchObject({id:'0gfX0dFLaBc',title:'Phone saved song',channel:'Phone artist'});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user