add a test for Smart Unselect in trees

This commit is contained in:
Konstantin Bulenkov
2017-08-25 18:40:26 +03:00
parent bf6702a8b3
commit 2911df071a
@@ -119,4 +119,24 @@ public class TreeSmartSelectTest extends AbstractTreeBuilderTest {
" [zoo.txt]\n");
}
public void testDecreaseSimple() throws Exception {
doAndWaitForBuilder(() -> {
Node intellij = myRoot.addChild("com");
intellij.addChild("a");
intellij.addChild("b");
Node c = intellij.addChild("c");
TreeUtil.expandAll(myTree);
getBuilder().select(c.myElement);
});
myProvider.increaseSelection(myTree);
myProvider.increaseSelection(myTree);
myProvider.decreaseSelection(myTree);
assertTree("-/\n" +
" -com\n" +
" [a]\n" +
" [b]\n" +
" [c]\n");
}
}