SEC-2915: groovy/gradle spaces->tabs
This commit is contained in:
@@ -4,23 +4,23 @@ apply from: WAR_SAMPLE_GRADLE
|
||||
def excludeModules = ['spring-security-acl', 'jsr250-api', 'ehcache', 'spring-jdbc', 'ldapsdk']
|
||||
|
||||
configurations {
|
||||
excludeModules.each {name ->
|
||||
runtime.exclude module: name
|
||||
}
|
||||
excludeModules.each {name ->
|
||||
runtime.exclude module: name
|
||||
}
|
||||
|
||||
runtime.exclude group: 'org.aspectj'
|
||||
runtime.exclude group: 'org.aspectj'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-security-taglibs'),
|
||||
jstlDependencies
|
||||
compile project(':spring-security-taglibs'),
|
||||
jstlDependencies
|
||||
|
||||
runtime project(':spring-security-web'),
|
||||
project(':spring-security-config'),
|
||||
project(':spring-security-ldap'),
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"ch.qos.logback:logback-classic:$logbackVersion",
|
||||
apachedsDependencies
|
||||
runtime project(':spring-security-web'),
|
||||
project(':spring-security-config'),
|
||||
project(':spring-security-ldap'),
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
"ch.qos.logback:logback-classic:$logbackVersion",
|
||||
apachedsDependencies
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
||||
+29
-29
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -26,35 +26,35 @@ import org.springframework.security.samples.pages.*
|
||||
*/
|
||||
@Stepwise
|
||||
class LdapXmlTests extends GebReportingSpec {
|
||||
def 'access home page with unauthenticated user success'() {
|
||||
when: 'Unauthenticated user accesses the Home Page'
|
||||
to HomePage
|
||||
then: 'The page is displayed'
|
||||
at HomePage
|
||||
}
|
||||
def 'access home page with unauthenticated user success'() {
|
||||
when: 'Unauthenticated user accesses the Home Page'
|
||||
to HomePage
|
||||
then: 'The page is displayed'
|
||||
at HomePage
|
||||
}
|
||||
|
||||
def 'access manage page with unauthenticated user sends to login page'() {
|
||||
when: 'Unauthenticated user accesses the Manage Page'
|
||||
secure.click(LoginPage)
|
||||
then: 'The login page is displayed'
|
||||
at LoginPage
|
||||
}
|
||||
def 'access manage page with unauthenticated user sends to login page'() {
|
||||
when: 'Unauthenticated user accesses the Manage Page'
|
||||
secure.click(LoginPage)
|
||||
then: 'The login page is displayed'
|
||||
at LoginPage
|
||||
}
|
||||
|
||||
def 'authenticated user is sent to original page'() {
|
||||
when: 'user authenticates'
|
||||
login()
|
||||
then: 'The secure page is displayed'
|
||||
at SecurePage
|
||||
}
|
||||
def 'authenticated user is sent to original page'() {
|
||||
when: 'user authenticates'
|
||||
login()
|
||||
then: 'The secure page is displayed'
|
||||
at SecurePage
|
||||
}
|
||||
|
||||
def 'authenticated user logs out'() {
|
||||
when: 'user logs out'
|
||||
logout.click()
|
||||
then: 'the default logout success page is displayed'
|
||||
at LogoutPage
|
||||
when: 'Unauthenticated user accesses the Manage Page'
|
||||
via SecurePage
|
||||
then: 'The login page is displayed'
|
||||
at LoginPage
|
||||
}
|
||||
def 'authenticated user logs out'() {
|
||||
when: 'user logs out'
|
||||
logout.click()
|
||||
then: 'the default logout success page is displayed'
|
||||
at LogoutPage
|
||||
when: 'Unauthenticated user accesses the Manage Page'
|
||||
via SecurePage
|
||||
then: 'The login page is displayed'
|
||||
at LoginPage
|
||||
}
|
||||
}
|
||||
+6
-6
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -23,9 +23,9 @@ import geb.*
|
||||
* @author Rob Winch
|
||||
*/
|
||||
class HomePage extends Page {
|
||||
static url = ''
|
||||
static at = { assert driver.title == 'Home Page'; true}
|
||||
static content = {
|
||||
secure(to: [SecurePage,LoginPage]) { $('a', text: 'Secure page') }
|
||||
}
|
||||
static url = ''
|
||||
static at = { assert driver.title == 'Home Page'; true}
|
||||
static content = {
|
||||
secure(to: [SecurePage,LoginPage]) { $('a', text: 'Secure page') }
|
||||
}
|
||||
}
|
||||
+12
-12
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -23,15 +23,15 @@ import geb.*
|
||||
* @author Rob Winch
|
||||
*/
|
||||
class LoginPage extends Page {
|
||||
static url = 'login'
|
||||
static at = { assert driver.title == 'Login Page'; true}
|
||||
static content = {
|
||||
login(required:false) { user='rod', password='koala' ->
|
||||
loginForm.username = user
|
||||
loginForm.password = password
|
||||
submit.click()
|
||||
}
|
||||
loginForm { $('form') }
|
||||
submit { $('input', type: 'submit') }
|
||||
}
|
||||
static url = 'login'
|
||||
static at = { assert driver.title == 'Login Page'; true}
|
||||
static content = {
|
||||
login(required:false) { user='rod', password='koala' ->
|
||||
loginForm.username = user
|
||||
loginForm.password = password
|
||||
submit.click()
|
||||
}
|
||||
loginForm { $('form') }
|
||||
submit { $('input', type: 'submit') }
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -20,6 +20,6 @@ package org.springframework.security.samples.pages
|
||||
* @author Rob Winch
|
||||
*/
|
||||
class LogoutPage extends LoginPage {
|
||||
static url = 'login'
|
||||
static at = { assert driver.title == 'Login Page' && $('p').text() == 'You have been logged out'; true}
|
||||
static url = 'login'
|
||||
static at = { assert driver.title == 'Login Page' && $('p').text() == 'You have been logged out'; true}
|
||||
}
|
||||
+6
-6
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -23,9 +23,9 @@ import geb.*
|
||||
* @author Rob Winch
|
||||
*/
|
||||
class SecurePage extends Page {
|
||||
static url = 'secure/'
|
||||
static at = { assert driver.title == 'Secure Page'; true}
|
||||
static content = {
|
||||
logout { $("input[type=submit]", value: "Logoff") }
|
||||
}
|
||||
static url = 'secure/'
|
||||
static at = { assert driver.title == 'Secure Page'; true}
|
||||
static content = {
|
||||
logout { $("input[type=submit]", value: "Logoff") }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user