Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Grails Metadata file
#Fri Mar 08 09:50:39 CST 2013
app.grails.version=2.4.4
app.grails.version=2.5.5
app.name=geb-example
app.version=0.2
8 changes: 6 additions & 2 deletions grails-app/conf/BuildConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,15 @@ grails.project.dependency.resolution = {
test "org.seleniumhq.selenium:selenium-chrome-driver:${webdriverVersion}"
test "org.seleniumhq.selenium:selenium-firefox-driver:${webdriverVersion}"
test "org.seleniumhq.selenium:selenium-ie-driver:${webdriverVersion}"
test("com.codeborne:phantomjsdriver:1.2.1") {
// phantomjs driver pulls in a different selenium version amongs other stuff it seemed
transitive = false
}

test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"

// For downloading browser-specific drivers that browsers like Chrome and IE require
test "io.github.bonigarcia:webdrivermanager:1.3.1"
test "io.github.bonigarcia:webdrivermanager:1.4.8"
}

plugins {
Expand All @@ -75,7 +79,7 @@ grails.project.dependency.resolution = {

compile ":asset-pipeline:2.3.8"

test ":remote-control:1.5"
test ":remote-control:2.0"
test ":geb:${gebVersion}"
}
}
52 changes: 24 additions & 28 deletions grails-app/conf/Config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,24 @@ grails.project.groupId = appName // change this to alter the default package nam
// The ACCEPT header will not be used for content negotiation for user agents containing the following strings (defaults to the 4 major rendering engines)
grails.mime.disable.accept.header.userAgents = ['Gecko', 'WebKit', 'Presto', 'Trident']
grails.mime.types = [ // the first one is the default format
all: '*/*', // 'all' maps to '*' or the first available format in withFormat
atom: 'application/atom+xml',
css: 'text/css',
csv: 'text/csv',
form: 'application/x-www-form-urlencoded',
html: ['text/html','application/xhtml+xml'],
js: 'text/javascript',
json: ['application/json', 'text/json'],
multipartForm: 'multipart/form-data',
rss: 'application/rss+xml',
text: 'text/plain',
hal: ['application/hal+json','application/hal+xml'],
xml: ['text/xml', 'application/xml']
all: '*/*', // 'all' maps to '*' or the first available format in withFormat
atom: 'application/atom+xml',
css: 'text/css',
csv: 'text/csv',
form: 'application/x-www-form-urlencoded',
html: ['text/html','application/xhtml+xml'],
js: 'text/javascript',
json: ['application/json', 'text/json'],
multipartForm: 'multipart/form-data',
rss: 'application/rss+xml',
text: 'text/plain',
hal: ['application/hal+json','application/hal+xml'],
xml: ['text/xml', 'application/xml']
]

// URL Mapping Cache Max Size, defaults to 5000
//grails.urlmapping.cache.maxsize = 1000

// What URL patterns should be processed by the resources plugin
grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']
grails.resources.adhoc.includes = ['/images/**', '/css/**', '/js/**', '/plugins/**']

// Legacy setting for codec used to encode data with ${}
grails.views.default.codec = "html"

Expand Down Expand Up @@ -100,22 +96,22 @@ environments {
}

// log4j configuration
log4j = {
log4j.main = {
// Example of changing the log pattern for the default console appender:
//
//appenders {
// console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
//}

error 'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
'org.codehaus.groovy.grails.web.mapping', // URL mapping
'org.codehaus.groovy.grails.commons', // core / classloading
'org.codehaus.groovy.grails.plugins', // plugins
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
'org.springframework',
'org.hibernate',
'net.sf.ehcache.hibernate'
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
'org.codehaus.groovy.grails.web.mapping', // URL mapping
'org.codehaus.groovy.grails.commons', // core / classloading
'org.codehaus.groovy.grails.plugins', // plugins
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
'org.springframework',
'org.hibernate',
'net.sf.ehcache.hibernate'
}
6 changes: 3 additions & 3 deletions grailsw
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ fi
if [ -z "$STARTER_CONF" ]; then
STARTER_CONF="$GRAILS_HOME/conf/groovy-starter.conf"
fi
STARTER_CLASSPATH="wrapper/grails-wrapper-runtime-2.4.4.jar:wrapper:."
STARTER_CLASSPATH="wrapper/grails-wrapper-runtime-2.5.5.jar:wrapper:."

# Allow access to Cocoa classes on OS X
if $darwin; then
Expand Down Expand Up @@ -200,15 +200,15 @@ if $mingw ; then
fi

if [ -z "$GRAILS_AGENT_CACHE_DIR" ]; then
GRAILS_AGENT_CACHE_DIR=~/.grails/2.4.4/
GRAILS_AGENT_CACHE_DIR=~/.grails/2.5.5/
fi
SPRINGLOADED_PARAMS=profile=grails\;cacheDir=$GRAILS_AGENT_CACHE_DIR
if [ ! -d "$GRAILS_AGENT_CACHE_DIR" ]; then
mkdir -p "$GRAILS_AGENT_CACHE_DIR"
fi

# Process JVM args
AGENT_STRING="-javaagent:wrapper/springloaded-1.2.1.RELEASE.jar -Xverify:none -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true -Dspringloaded=$SPRINGLOADED_PARAMS"
AGENT_STRING="-javaagent:wrapper/springloaded-1.2.5.RELEASE.jar -Xverify:none -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true -Dspringloaded=$SPRINGLOADED_PARAMS"
CMD_LINE_ARGS=""
DISABLE_RELOADING=true

Expand Down
8 changes: 4 additions & 4 deletions grailsw.bat
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if "%GRAILS_HOME:~-1%"=="\" SET GRAILS_HOME=%GRAILS_HOME:~0,-1%
:init

for %%x in ("%USERPROFILE%") do set SHORTHOME=%%~fsx
if "x%GRAILS_AGENT_CACHE_DIR%" == "x" set GRAILS_AGENT_CACHE_DIR=%SHORTHOME%/.grails/2.4.4/
if "x%GRAILS_AGENT_CACHE_DIR%" == "x" set GRAILS_AGENT_CACHE_DIR=%SHORTHOME%/.grails/2.5.5/
set SPRINGLOADED_PARAMS="profile=grails;cacheDir=%GRAILS_AGENT_CACHE_DIR%"
if not exist "%GRAILS_AGENT_CACHE_DIR%" mkdir "%GRAILS_AGENT_CACHE_DIR%"

Expand All @@ -69,7 +69,7 @@ if "%GRAILS_NO_PERMGEN%" == "" (
if not errorlevel 1 set GRAILS_NO_PERMGEN=1
)

set AGENT_STRING=-javaagent:wrapper/springloaded-1.2.1.RELEASE.jar -Xverify:none -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true -Dspringloaded=\"%SPRINGLOADED_PARAMS%\"
set AGENT_STRING=-javaagent:wrapper/springloaded-1.2.5.RELEASE.jar -Xverify:none -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true -Dspringloaded=\"%SPRINGLOADED_PARAMS%\"
set DISABLE_RELOADING=
if "%GRAILS_OPTS%" == "" (
set GRAILS_OPTS=-server -Xmx768M -Xms64M -Dfile.encoding=UTF-8
Expand Down Expand Up @@ -140,7 +140,7 @@ set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
set STARTER_CLASSPATH=wrapper/grails-wrapper-runtime-2.4.4.jar;wrapper;.
set STARTER_CLASSPATH=wrapper/grails-wrapper-runtime-2.5.5.jar;wrapper;.

if exist "%USERPROFILE%/.groovy/init.bat" call "%USERPROFILE%/.groovy/init.bat"

Expand Down Expand Up @@ -169,7 +169,7 @@ set JAVA_OPTS=%GRAILS_OPTS% %JAVA_OPTS% %AGENT%

set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name="%PROGNAME%"
set JAVA_OPTS=%JAVA_OPTS% -Dgrails.home="%GRAILS_HOME%"
set JAVA_OPTS=%JAVA_OPTS% -Dgrails.version=2.4.4
set JAVA_OPTS=%JAVA_OPTS% -Dgrails.version=2.5.5
set JAVA_OPTS=%JAVA_OPTS% -Dbase.dir=.
set JAVA_OPTS=%JAVA_OPTS% -Dtools.jar="%TOOLS_JAR%"
set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.starter.conf="%STARTER_CONF%"
Expand Down
12 changes: 12 additions & 0 deletions test/functional/GebConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@

import io.github.bonigarcia.wdm.ChromeDriverManager
import io.github.bonigarcia.wdm.InternetExplorerDriverManager
import io.github.bonigarcia.wdm.PhantomJsDriverManager

import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.ie.InternetExplorerDriver
import org.openqa.selenium.phantomjs.PhantomJSDriver

// http://www.gebish.org/manual/current/configuration.html#waiting_for_base_navigator
baseNavigatorWaiting = true
Expand Down Expand Up @@ -39,4 +42,13 @@ environments {

driver = { new InternetExplorerDriver() }
}

phantom {
PhantomJsDriverManager.getInstance().setup()
waiting {
timeout = 2
}
driver = { new PhantomJSDriver() }
}

}
29 changes: 29 additions & 0 deletions test/functional/geb/example/SimpleTestSpec.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package geb.example

import geb.spock.GebSpec

class SimpleTestSpec extends GebSpec {

def "sanity check list page"() {
given:
go "idea/list"

expect: "it to contain the basic header"
driver.pageSource.contains("<h1>Idea List</h1>")

when:
println driver.pageSource

then:
title == "Idea List"
//pageSource gives entire page
driver.pageSource.contains("<h1>Idea List</h1>")

when: "create is clicked"
$("div.nav a.create").click()

then: "make sure it has the right title"
title == "Create Idea"
//driver.pageSource.contains("<h1>Idea List</h1>")
}
}
Binary file removed wrapper/grails-wrapper-runtime-2.4.4.jar
Binary file not shown.
Binary file added wrapper/grails-wrapper-runtime-2.5.5.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion wrapper/grails-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
wrapper.dist.url=http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/
wrapper.dist.url=https://github.com/grails/grails-core/releases/download/v2.5.5/
Binary file removed wrapper/springloaded-1.2.1.RELEASE.jar
Binary file not shown.
Binary file added wrapper/springloaded-1.2.5.RELEASE.jar
Binary file not shown.