@@ -335,108 +335,6 @@ describe('App', () => {
335335 expect ( ( ) => screen . getByTestId ( 'plot-summary.json:loss' ) ) . not . toThrow ( )
336336 } )
337337
338- it ( 'should toggle the visibility of revisions in the comparison table when clicking the revisions in the picker' , async ( ) => {
339- render (
340- < Plots
341- state = { {
342- data : {
343- comparison : comparisonTableFixture ,
344- sectionCollapsed : DEFAULT_SECTION_COLLAPSED ,
345- template : null
346- }
347- } }
348- />
349- )
350-
351- const summaryElement = await screen . findByText ( 'Images' )
352- fireEvent . click ( summaryElement , {
353- bubbles : true ,
354- cancelable : true
355- } )
356-
357- const comparisonTable = screen . getByRole ( 'table' )
358-
359- const workspaceHeader = within ( comparisonTable ) . queryByText ( 'workspace' )
360- expect ( workspaceHeader ) . toBeInTheDocument ( )
361-
362- const [ , pickerButton ] = screen . queryAllByTestId ( 'icon-menu-item' )
363- fireEvent . mouseEnter ( pickerButton )
364- fireEvent . click ( pickerButton )
365-
366- const [ , selectMenu ] = screen . getAllByRole ( 'menu' )
367- const workspaceItem = within ( selectMenu ) . getByText ( 'workspace' )
368-
369- fireEvent . click ( workspaceItem , {
370- bubbles : true ,
371- cancelable : true
372- } )
373-
374- expect ( workspaceHeader ) . not . toBeInTheDocument ( )
375-
376- fireEvent . mouseEnter ( pickerButton )
377- fireEvent . click ( pickerButton )
378-
379- fireEvent . click ( workspaceItem , {
380- bubbles : true ,
381- cancelable : true
382- } )
383-
384- expect ( within ( comparisonTable ) . getByText ( 'workspace' ) ) . toBeInTheDocument ( )
385- } )
386-
387- it ( 'should show the newest revision in the comparision table even if some revisions were filtered out' , async ( ) => {
388- const { rerender } = render (
389- < Plots
390- state = { {
391- data : {
392- comparison : comparisonTableFixture ,
393- sectionCollapsed : DEFAULT_SECTION_COLLAPSED
394- }
395- } }
396- />
397- )
398-
399- const summaryElement = await screen . findByText ( 'Images' )
400- fireEvent . click ( summaryElement , {
401- bubbles : true ,
402- cancelable : true
403- } )
404-
405- const [ , pickerButton ] = screen . queryAllByTestId ( 'icon-menu-item' )
406- fireEvent . mouseEnter ( pickerButton )
407- fireEvent . click ( pickerButton )
408-
409- const [ , selectMenu ] = screen . getAllByRole ( 'menu' )
410- const workspaceItem = within ( selectMenu ) . getByText ( 'workspace' )
411-
412- fireEvent . click ( workspaceItem , {
413- bubbles : true ,
414- cancelable : true
415- } )
416-
417- const newRevision = 'newRev'
418-
419- rerender (
420- < Plots
421- state = { {
422- data : {
423- comparison : {
424- ...comparisonTableFixture ,
425- revisions : [
426- ...comparisonTableFixture . revisions ,
427- { displayColor : '#945dd6' , revision : newRevision }
428- ]
429- } ,
430- sectionCollapsed : DEFAULT_SECTION_COLLAPSED
431- }
432- } }
433- />
434- )
435-
436- const workspaceHeader = screen . queryAllByText ( newRevision )
437- expect ( workspaceHeader . length ) . toBe ( 3 ) // One in the table, one in the menu, and one in the ribbon
438- } )
439-
440338 it ( 'should send a message to the extension with the selected metrics when toggling the visibility of a plot' , async ( ) => {
441339 renderAppWithData ( {
442340 checkpoint : checkpointPlotsFixture ,
0 commit comments