Skip to content

Commit 409d2c5

Browse files
committed
Reread the items of the problems view
1 parent b06c3cd commit 409d2c5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

net.sourceforge.pmd.eclipse.plugin.test/src/main/java/net/sourceforge/pmd/eclipse/ui/dialogs/ViolationDetailsDialogTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ public void openDialogViaProblemView() throws Exception {
8484
openJavaPerspective();
8585

8686
SWTBotView problemsView = bot.viewByPartName("Problems");
87-
SWTBotTreeItem item = problemsView.bot().tree().getTreeItem("Warnings (4 items)").expand();
8887
String markerText = "UnnecessaryModifier: Unnecessary modifier 'public' on method 'run': the method is declared in an interface type";
8988

90-
bot.waitUntil(new DefaultCondition() {
89+
problemsView.bot().waitUntil(new DefaultCondition() {
9190
@Override
9291
public boolean test() throws Exception {
9392
try {
93+
SWTBotTreeItem item = bot.tree().getTreeItem("Warnings (4 items)").expand();
9494
item.getNode(markerText);
9595
} catch (WidgetNotFoundException e) {
9696
return false;
@@ -103,6 +103,7 @@ public String getFailureMessage() {
103103
return "Marker not found";
104104
}
105105
});
106+
SWTBotTreeItem item = problemsView.bot().tree().getTreeItem("Warnings (4 items)").expand();
106107
SWTBotTreeItem markerItem = item.getNode(markerText).select();
107108
markerItem.contextMenu("Show details...").click();
108109

0 commit comments

Comments
 (0)