@@ -247,99 +247,6 @@ describe('PlayerBar container', () => {
247247 expect ( state . queue . currentTrack ) . toBe ( 0 ) ;
248248 } ) ;
249249
250- xit ( 'should lock the track after failing to resolve stream URLs after 3 retries' , async ( ) => {
251- const { store, component } = mountComponent ( {
252- queue : {
253- currentTrack : 0 ,
254- queueItems : [
255- {
256- uuid : 'uuid1' ,
257- artist : 'test artist name' ,
258- name : 'track without streams' ,
259- streamLookupRetries : 2
260- // no streams provided
261- }
262- ]
263- } ,
264- plugin : {
265- plugins : {
266- streamProviders : [
267- {
268- sourceName : 'Mocked Stream Provider' ,
269- search : jest . fn ( ( ) => ( [ {
270- id : 'test-stream-id' ,
271- author : {
272- name : 'test author'
273- }
274- } ] ) ) ,
275- getStreamForId : jest . fn ( ( ) => {
276- throw new Error ( 'Failed to load stream.' ) ;
277- } )
278- }
279- ]
280- } ,
281- selected : {
282- streamProviders : 'Mocked Stream Provider'
283- }
284- }
285- } ) ;
286-
287- await waitFor ( ( ) => {
288- const state = store . getState ( ) ;
289- const track = state . queue . queueItems [ 0 ] ;
290- expect ( track . error ) . toBeTruthy ( ) ;
291- expect ( track . streamLookupRetries ) . toBe ( 3 ) ;
292- } ) ;
293-
294- const errorOverlay = await component . findByText ( 'Failed to load stream.' ) ;
295- expect ( errorOverlay ) . toBeInTheDocument ( ) ;
296- } ) ;
297-
298- xit ( 'should increment streamLookupRetries after a stream lookup failure' , async ( ) => {
299- const { store, component } = mountComponent ( {
300- queue : {
301- currentTrack : 0 ,
302- queueItems : [
303- {
304- uuid : 'uuid1' ,
305- artist : 'test artist name' ,
306- name : 'track without streams' ,
307- streamLookupRetries : 0 ,
308- streams : [ ]
309- }
310- ]
311- } ,
312- plugin : {
313- plugins : {
314- streamProviders : [
315- {
316- sourceName : 'Mocked Stream Provider' ,
317- search : jest . fn ( ) . mockResolvedValue ( ( ) => ( [ {
318- id : 'test-stream-id' ,
319- author : {
320- name : 'test author'
321- }
322- } ] ) ) ,
323- getStreamForId : jest . fn ( ( ) => {
324- throw new Error ( 'Failed to load stream.' ) ;
325- } )
326- }
327- ]
328- } ,
329- selected : {
330- streamProviders : 'Mocked Stream Provider'
331- }
332- }
333- } ) ;
334-
335- await waitFor ( ( ) => {
336- const state = store . getState ( ) ;
337- const track = state . queue . queueItems [ 0 ] ;
338- expect ( track . streamLookupRetries ) . toBe ( 1 ) ;
339- expect ( track . error ) . toBeTruthy ( ) ;
340- } ) ;
341- } ) ;
342-
343250 const mountComponent = ( initialStore ?: AnyProps ) => {
344251 const store = configureMockStore ( {
345252 ...buildStoreState ( )
0 commit comments