use of com.android.tools.idea.tests.gui.framework.fixture.gradle.GradleToolWindowFixture in project android by JetBrains.
the class GradleTasksTest method runTask.
private void runTask(@NotNull String taskName, @NotNull Consumer<ExecutionToolWindowFixture.ContentFixture> closure) {
GradleToolWindowFixture gradleToolWindow = guiTest.ideFrame().getGradleToolWindow();
gradleToolWindow.runTask(taskName);
// Ensure that task output is shown and updated.
String regex = ".*SimpleApplication \\[" + taskName + "\\].*";
PatternTextMatcher matcher = new PatternTextMatcher(Pattern.compile(regex, DOTALL));
closure.consume(guiTest.ideFrame().getRunToolWindow().findContent(matcher));
}
Aggregations