Skip to content

Commit

Permalink
205: show "no tests found" when we select more than one item
Browse files Browse the repository at this point in the history
Task-Url: #205
  • Loading branch information
LorenzoBettini committed Aug 25, 2022
1 parent a2d2793 commit 3b9ee62
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ private void launch(Object[] elements, String mode) {

if (launchElement.isPresent()) {
performLaunch(launchElement.get(), mode);
return;
}
} else {
showNoTestsFoundDialog();
}
showNoTestsFoundDialog();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,9 @@ public SWTBotTreeItem selectPackageRoot(String projectName, String src) {
return null;

}

public void selectProjectFile(String projectName, String fileName) {
SWTBotTreeItem project = getProject(projectName);
project.select(fileName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,11 @@ public void runPitOnTwoSelectedElementsShowDialogNoTestsFound() throws CoreExcep
PAGES.getRunMenu().runPit();
new NoTestsFoundDialog(bot).assertAppears();
}

@Test
public void runPitOnNonJavaFileShowsDialogNoTestsFound() throws CoreException {
PAGES.getPackageExplorer().selectProjectFile(TEST_PROJECT, "README");
PAGES.getRunMenu().runPit();
new NoTestsFoundDialog(bot).assertAppears();
}
}

0 comments on commit 3b9ee62

Please sign in to comment.