diff --git a/build.gradle b/build.gradle index f7979f4..5d67ccf 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ buildscript { group = 'org.springframework.session' -ext.springBootVersion = '1.2.3.RELEASE' +ext.springBootVersion = '1.3.2.RELEASE' ext.JAVA_GRADLE = "$rootDir/gradle/java.gradle" ext.SPRING3_GRADLE = "$rootDir/gradle/spring3.gradle" ext.MAVEN_GRADLE = "$rootDir/gradle/publish-maven.gradle" diff --git a/gradle.properties b/gradle.properties index 1f0999d..baed5a4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,18 +1,22 @@ -commonsPoolVersion=2.2 -jacksonVersion=2.4.5 +commonsPoolVersion=2.4.2 +jacksonVersion=2.6.5 jspApiVersion=2.0 servletApiVersion=3.0.1 version=1.1.0.BUILD-SNAPSHOT -springDataRedisVersion=1.4.2.RELEASE -junitVersion=4.11 -gebVersion=0.10.0 -hazelcastVersion=3.5.1 -seleniumVersion=2.44.0 -springSecurityVersion=4.0.0.RELEASE -springVersion=4.1.6.RELEASE -jedisVersion=2.5.2 +springDataRedisVersion=1.6.2.RELEASE +junitVersion=4.12 +gebVersion=0.13.1 +hazelcastVersion=3.5.4 +seleniumVersion=2.52.0 +springSecurityVersion=4.0.3.RELEASE +springVersion=4.2.5.RELEASE +jedisVersion=2.7.3 springDataGemFireVersion=1.7.2.RELEASE -spockVersion=0.7-groovy-2.0 +spockVersion=1.0-groovy-2.4 assertjVersion=2.3.0 jstlVersion=1.2.1 -groovyVersion=2.3.11 +groovyVersion=2.4.4 +mockitoVersion=1.10.19 +springShellVersion=1.1.0.RELEASE +httpClientVersion=4.5.1 +jstlelVersion=1.2.5 \ No newline at end of file diff --git a/samples/findbyusername/build.gradle b/samples/findbyusername/build.gradle index a9dc1af..1e16d18 100644 --- a/samples/findbyusername/build.gradle +++ b/samples/findbyusername/build.gradle @@ -24,7 +24,7 @@ dependencies { "org.springframework.security:spring-security-web:$springSecurityVersion", "org.springframework.security:spring-security-config:$springSecurityVersion", "com.maxmind.geoip2:geoip2:2.3.1", - "org.apache.httpcomponents:httpclient:4.4.1" + "org.apache.httpcomponents:httpclient" testCompile "org.springframework.boot:spring-boot-starter-test", "org.assertj:assertj-core:$assertjVersion" diff --git a/samples/users/src/integration-test/groovy/sample/UserTests.groovy b/samples/users/src/integration-test/groovy/sample/UserTests.groovy index 659704d..46aa5c6 100644 --- a/samples/users/src/integration-test/groovy/sample/UserTests.groovy +++ b/samples/users/src/integration-test/groovy/sample/UserTests.groovy @@ -28,6 +28,10 @@ import pages.* */ @Stepwise class UserTests extends GebReportingSpec { + def setup() { + browser.driver.javascriptEnabled = true + } + def 'first visit not authenticated'() { when: to HomePage diff --git a/samples/users/src/integration-test/groovy/sample/pages/HomePage.groovy b/samples/users/src/integration-test/groovy/sample/pages/HomePage.groovy index 92351d0..47e2bd4 100644 --- a/samples/users/src/integration-test/groovy/sample/pages/HomePage.groovy +++ b/samples/users/src/integration-test/groovy/sample/pages/HomePage.groovy @@ -29,9 +29,25 @@ class HomePage extends Page { navLink { $('#navLink') } error { $('#error').text() } form { $('form') } - username(required:false) { $('#un').text() } - logout(required:false) { $('#logout') } - addAccount(required:false) { $('#addAccount') } + username(required:false) { + $('#un').text() + } + userMenu() { + if(!$('#user-menu').displayed) { + $('#toggle').jquery.click() + } + waitFor { + $('#user-menu').displayed + } + } + logout(required:false) { + userMenu() + $('#logout') + } + addAccount(required:false) { + userMenu() + $('#addAccount') + } submit { $('input[type=submit]') } login(required:false) { user, pass -> form.username = user @@ -39,6 +55,7 @@ class HomePage extends Page { submit.click(HomePage) } switchAccount{ un -> + userMenu() $("#switchAccount${un}").click(HomePage) } attributes { moduleList AttributeRow, $("table tr").tail() } diff --git a/samples/users/src/integration-test/groovy/sample/pages/LinkPage.groovy b/samples/users/src/integration-test/groovy/sample/pages/LinkPage.groovy index 0d87bac..13fc714 100644 --- a/samples/users/src/integration-test/groovy/sample/pages/LinkPage.groovy +++ b/samples/users/src/integration-test/groovy/sample/pages/LinkPage.groovy @@ -28,7 +28,16 @@ class LinkPage extends Page { static content = { form { $('#navLinks') } username(required:false) { $('#un').text() } + userMenu() { + if(!$('#user-menu').displayed) { + $('#toggle').jquery.click() + } + waitFor { + $('#user-menu').displayed + } + } switchAccount{ un -> + userMenu() $("#switchAccount${un}").click(HomePage) } } diff --git a/samples/users/src/main/webapp/index.jsp b/samples/users/src/main/webapp/index.jsp index 45e655a..3141d84 100644 --- a/samples/users/src/main/webapp/index.jsp +++ b/samples/users/src/main/webapp/index.jsp @@ -34,8 +34,8 @@