Adding a TreeItem before the selected item does not correctly update the selection

XMLWordPrintable

      Adding a TreeItem before the selected item does not correctly update the selection. Below is a test scenario added to TreeTableViewTest. For now It is ignored using this JBS issue.

      @Test public void testSelectionUpdatesCorrectlyAfterAddingAnItemBeforeSelectedItem() {
              setupForPermutationTest();
              TreeItem<String> parentOfSelectedTreeItem = ((TreeItem<String>)sm.getSelectedItem()).getParent();
              int indexOfSelectedItem = parentOfSelectedTreeItem.getChildren().indexOf(sm.getSelectedItem());
              if (indexOfSelectedItem > 0) {
                  indexOfSelectedItem--;
              }
              parentOfSelectedTreeItem.getChildren().add(indexOfSelectedItem, new TreeItem("AddingOne"));
              verifySelectionAfterPermutation();
          }

            Assignee:
            Ambarish Rapte
            Reporter:
            Ambarish Rapte
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: