File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
webview/src/experiments/components Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -767,6 +767,36 @@ describe('App', () => {
767767 const itemLabels = menuitems . map ( item => item . textContent )
768768 expect ( itemLabels ) . toContain ( 'Remove' )
769769 } )
770+
771+ it ( 'should present the Remove option if multiple checkpoint tip rows are selected' , async ( ) => {
772+ render ( < App /> )
773+
774+ fireEvent (
775+ window ,
776+ new MessageEvent ( 'message' , {
777+ data : {
778+ data : {
779+ ...tableDataFixture ,
780+ hasRunningExperiment : false
781+ } ,
782+ type : MessageToWebviewType . SET_DATA
783+ }
784+ } )
785+ )
786+
787+ const firstRow = screen . getByTestId ( 'timestamp___1.exp-e7a67' )
788+ fireEvent . click ( firstRow )
789+
790+ const secondRow = screen . getByTestId ( 'timestamp___1.test-branch' )
791+ fireEvent . click ( secondRow )
792+
793+ const target = await screen . findByText ( '4fb124a' )
794+ fireEvent . contextMenu ( target , { bubbles : true } )
795+
796+ const menuitems = await screen . findAllByRole ( 'menuitem' )
797+ const itemLabels = menuitems . map ( item => item . textContent )
798+ expect ( itemLabels ) . toContain ( 'Remove Selected Rows' )
799+ } )
770800 } )
771801
772802 describe ( 'Context Menu Suppression' , ( ) => {
You can’t perform that action at this time.
0 commit comments