From 712003b436e8a86d636ac9eed4a86960db303c00 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Mon, 26 Sep 2016 16:54:25 +0100 Subject: [PATCH] Switch off smoke tests by default in IDE The Maven build now sets a System property smoke.test=true. The tests are skipped if this is not set, so by default the IDE will not run them. --- initializr-web/pom.xml | 3 +++ .../web/project/ProjectGenerationSmokeTests.groovy | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/initializr-web/pom.xml b/initializr-web/pom.xml index 01df944a..d7ad8ccb 100644 --- a/initializr-web/pom.xml +++ b/initializr-web/pom.xml @@ -136,6 +136,9 @@ test + + true + **/*SmokeTests.java diff --git a/initializr-web/src/test/groovy/io/spring/initializr/web/project/ProjectGenerationSmokeTests.groovy b/initializr-web/src/test/groovy/io/spring/initializr/web/project/ProjectGenerationSmokeTests.groovy index 21d2d9d4..e52b8637 100644 --- a/initializr-web/src/test/groovy/io/spring/initializr/web/project/ProjectGenerationSmokeTests.groovy +++ b/initializr-web/src/test/groovy/io/spring/initializr/web/project/ProjectGenerationSmokeTests.groovy @@ -16,11 +16,15 @@ package io.spring.initializr.web.project +import static org.junit.Assert.assertEquals +import static org.junit.Assert.assertTrue import geb.Browser import io.spring.initializr.test.generator.ProjectAssert import io.spring.initializr.web.AbstractInitializrControllerIntegrationTests import io.spring.initializr.web.project.test.HomePage + import org.junit.After +import org.junit.Assume import org.junit.Before import org.junit.Test import org.openqa.selenium.Keys @@ -28,12 +32,8 @@ import org.openqa.selenium.WebDriver import org.openqa.selenium.firefox.FirefoxDriver import org.openqa.selenium.firefox.FirefoxProfile import org.openqa.selenium.interactions.Actions - import org.springframework.test.context.ActiveProfiles -import static org.junit.Assert.assertEquals -import static org.junit.Assert.assertTrue - /** * * @author Stephane Nicoll @@ -50,6 +50,7 @@ class ProjectGenerationSmokeTests extends AbstractInitializrControllerIntegratio @Before void setup() { + Assume.assumeTrue("Not in smoke test (System property smoke.test not set)", Boolean.getBoolean("smoke.test")) downloadDir = folder.newFolder() FirefoxProfile fxProfile = new FirefoxProfile();