File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
packages/selenium-ide/src/neo/components Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ import "./style.css";
3333const testTarget = {
3434 canDrop ( props , monitor ) {
3535 const test = monitor . getItem ( ) . test ;
36- return ! props . suite . containsTest ( props . suite . tests , test ) ;
36+ return ! props . suite . containsTest ( test ) ;
3737 } ,
3838 hover ( props , monitor ) {
3939 // check if they are different suites
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ const testSource = {
3939 } ;
4040 } ,
4141 isDragging ( props , monitor ) {
42- return ( props . test . id === monitor . getItem ( ) . id ) ;
42+ return ( props . test . id === monitor . getItem ( ) . id && props . suite . id === monitor . getItem ( ) . suite . id ) ;
4343 }
4444} ;
4545
@@ -65,6 +65,9 @@ const testTarget = {
6565 dragged . suite = props . suite ;
6666 dragged . index = props . suite . tests . length - 1 ;
6767 return ;
68+ } else if ( ! monitor . canDrop ( ) && props . suite !== dragged . suite ) {
69+ // trying to move a duplicate
70+ return ;
6871 }
6972 const dragIndex = dragged . index ;
7073 const hoverIndex = props . index ;
You can’t perform that action at this time.
0 commit comments