Search in sources :

Example 1 with GradleToolWindowFixture

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));
}
Also used : GradleToolWindowFixture(com.android.tools.idea.tests.gui.framework.fixture.gradle.GradleToolWindowFixture) PatternTextMatcher(org.fest.swing.util.PatternTextMatcher)

Aggregations

GradleToolWindowFixture (com.android.tools.idea.tests.gui.framework.fixture.gradle.GradleToolWindowFixture)1 PatternTextMatcher (org.fest.swing.util.PatternTextMatcher)1