Skip to content

Commit

Permalink
Switching to 4.0.1-SNAPSHOT of the geb plugin for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jdaugherty committed Nov 25, 2024
1 parent 537303f commit 6f827a7
Show file tree
Hide file tree
Showing 61 changed files with 82 additions and 539 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
id: tests
uses: gradle/gradle-build-action@v2
with:
arguments: check -Dgeb.env=chromeHeadless
arguments: check
env:
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
Expand All @@ -53,7 +53,7 @@ jobs:
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
with:
arguments: build -Dgeb.env=chromeHeadless
arguments: build
- name: Publish Test Report
if: steps.build.outcome == 'failure' || steps.tests.outcome == 'failure'
uses: scacap/action-surefire-report@v1
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@

A Suite of functional tests for Grails

To change the Geb driver used to run the functional tests supply the geb.env system property.

./gradlew -Dgeb.env=chromeHeadless iT
6 changes: 4 additions & 2 deletions app1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ buildscript {
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:$assetPipelineVersion"
classpath "gradle.plugin.com.energizedwork.webdriver-binaries:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
}
}

plugins {
id 'com.github.ben-manes.versions' version '0.39.0'
}

version "0.1"
group "functionaltests"

apply plugin: "war"
apply plugin: "asset-pipeline"
apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
apply plugin:"com.energizedwork.webdriver-binaries"

assets {
minifyJs = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package functionaltests

import grails.gorm.transactions.Rollback
import grails.plugin.geb.ContainerGebSpec
import grails.testing.mixin.integration.Integration

/*
Expand All @@ -19,16 +20,12 @@ import grails.testing.mixin.integration.Integration
* limitations under the License.
*/



import geb.spock.*

/**
* @author graemerocher
*/
@Integration(applicationClass = Application)
@Rollback
class AsyncFunctionalSpec extends GebSpec {
class AsyncFunctionalSpec extends ContainerGebSpec {

void "Test async response rendering works"() {
when:"When an async response is rendered"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package functionaltests

import grails.testing.mixin.integration.Integration
import geb.spock.GebSpec
import grails.plugin.geb.ContainerGebSpec
import spock.lang.Issue

@Integration(applicationClass=functionaltests.Application)
class BookFunctionalSpec extends GebSpec {
class BookFunctionalSpec extends ContainerGebSpec {

void "Test that when the /viewBooks URL is hit it redirects to the book list"() {
when:"We go to the book URI"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package functionaltests

import geb.spock.GebSpec
import grails.plugin.geb.ContainerGebSpec
import grails.gorm.transactions.Rollback
import grails.testing.mixin.integration.Integration

@Integration(applicationClass = Application)
@Rollback
class ConfigTestControllerSpec extends GebSpec {
class ConfigTestControllerSpec extends ContainerGebSpec {

void "Test that configuration properties are correctly read"() {
when:"When evaluting configuration values"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package functionaltests

import grails.testing.mixin.integration.Integration
import spock.lang.*
import geb.spock.*
import grails.plugin.geb.ContainerGebSpec

@Integration(applicationClass = Application)
class ControllerFromPluginSpec extends GebSpec {
class ControllerFromPluginSpec extends ContainerGebSpec {

void 'test invoking a controller provided by a plugin'() {
when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,14 @@ import grails.testing.mixin.integration.Integration
* limitations under the License.
*/



import spock.lang.*
import geb.spock.*
import grails.plugin.geb.ContainerGebSpec

/**
* @author graemerocher
*/
@Integration(applicationClass = Application)
@Rollback
class ControllerIncludesSpec extends GebSpec {
class ControllerIncludesSpec extends ContainerGebSpec {

void "Test includes that render a view work when called from a controller action"() {
when:"When an include that renders a view is used inside a controller action"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import grails.gorm.transactions.Rollback
import grails.testing.mixin.integration.Integration

import spock.lang.*
import geb.spock.*
import grails.plugin.geb.ContainerGebSpec

/**
*/
@Integration(applicationClass = Application)
@Rollback
class ErrorsFunctionalSpec extends GebSpec {
class ErrorsFunctionalSpec extends ContainerGebSpec {

void "Test exception handling methods for internal controller exceptions"() {
when:"An action that throws a custom error that is handled by a 500 mapping in UrlMappings.groovy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import grails.gorm.transactions.Rollback
import grails.testing.mixin.integration.Integration

import spock.lang.*
import geb.spock.*
import grails.plugin.geb.ContainerGebSpec

/**
*/
@Integration(applicationClass = Application)
@Rollback
class ForwardingSpec extends GebSpec {
class ForwardingSpec extends ContainerGebSpec {

void "Test forward to same controller"() {
when:"A forward is issued to an action in the same controller"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package functionaltests

import geb.spock.*
import grails.plugin.geb.ContainerGebSpec
import grails.testing.mixin.integration.Integration

@Integration(applicationClass = Application)
class HomeSpec extends GebSpec {
class HomeSpec extends ContainerGebSpec {

void "Test the home page renders correctly"() {
when:"The home page is visited"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package functionaltests

import geb.spock.*
import grails.plugin.geb.ContainerGebSpec
import grails.testing.mixin.integration.Integration
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.*

/**
*/
@Integration(applicationClass = Application)
class i18nSpec extends GebSpec {
class i18nSpec extends ContainerGebSpec {

@Autowired
MessageSource messageSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package functionaltests

import grails.testing.mixin.integration.Integration
import spock.lang.Issue
import geb.spock.GebSpec
import grails.plugin.geb.ContainerGebSpec

@Integration(applicationClass = Application)
class InspectConfigControllerSpec extends GebSpec {
class InspectConfigControllerSpec extends ContainerGebSpec {

@Issue('GRAILS-11951')
void "test config properties from plugins"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package functionaltests

import grails.testing.mixin.integration.Integration
import spock.lang.*
import geb.spock.*
import grails.plugin.geb.ContainerGebSpec

/**
* @author graemerocher
*/
@Integration(applicationClass = Application)
class InterceptorDependencyInjectionSpec extends GebSpec {
class InterceptorDependencyInjectionSpec extends ContainerGebSpec {

void "Test that interceptors are subjected to autowire by name"() {
when:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package functionaltests

import geb.spock.GebSpec
import grails.plugin.geb.ContainerGebSpec
import grails.testing.mixin.integration.Integration
import spock.lang.Issue

@Integration(applicationClass = Application)
class InterceptorFunctionalSpec extends GebSpec {
class InterceptorFunctionalSpec extends ContainerGebSpec {

@Issue('grails/grails-core#9434')
void "Test that an interceptor exception is handled correctly"() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package functionaltests

import geb.spock.GebSpec
import grails.plugin.geb.ContainerGebSpec
import grails.testing.mixin.integration.Integration

@Integration
class LoadAfterSpec extends GebSpec {
class LoadAfterSpec extends ContainerGebSpec {

void "Test override one plugin view from another plugin"() {
when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package functionaltests

import grails.testing.mixin.integration.Integration
import spock.lang.*
import geb.spock.*
import grails.plugin.geb.ContainerGebSpec

@Integration(applicationClass = Application)
class MiscFunctionalSpec extends GebSpec {
class MiscFunctionalSpec extends ContainerGebSpec {

@Issue('9133')
void "Test that bean override configuration works"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import grails.gorm.transactions.Rollback
import grails.testing.mixin.integration.Integration

import spock.lang.*
import geb.spock.*
import grails.plugin.geb.ContainerGebSpec

/**
*/
@Integration(applicationClass = Application)
@Rollback
class PluginViewsControllerSpec extends GebSpec {
class PluginViewsControllerSpec extends ContainerGebSpec {

void "Test that when plugin templates are rendered they render correctly"() {
when:"A view that renders plugin templates is visisted"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package functionaltests

import grails.testing.mixin.integration.Integration
import spock.lang.*
import geb.spock.*
import grails.plugin.geb.ContainerGebSpec

/**
* @author graemerocher
*/
@Integration(applicationClass = Application)
class RedirectInterceptorSpec extends GebSpec {
class RedirectInterceptorSpec extends ContainerGebSpec {

void "Test that an interceptor that redirects works"() {
when:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package functionaltests

import geb.spock.GebSpec
import grails.plugin.geb.ContainerGebSpec
import grails.gorm.transactions.Rollback
import grails.testing.mixin.integration.Integration
import spock.lang.Issue

@Integration
@Rollback
class RedirectWithAndWithoutParamsFunctionalSpec extends GebSpec {
class RedirectWithAndWithoutParamsFunctionalSpec extends ContainerGebSpec {

@Issue('grails-core-#10965')
void 'Params are not added to the url after a redirect even if they are passed to the redirect'() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package functionaltests

import geb.spock.*
import grails.plugin.geb.ContainerGebSpec
import grails.testing.mixin.integration.Integration

/**
*/
@Integration(applicationClass = Application)
class UploadControllerSpec extends GebSpec {
class UploadControllerSpec extends ContainerGebSpec {


void "Test file upload"() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package functionaltests


import geb.spock.*
import grails.plugin.geb.ContainerGebSpec
import grails.testing.mixin.integration.Integration

@Integration(applicationClass = Application)
class UriMatchingInterceptorFunctionalSpec extends GebSpec {
class UriMatchingInterceptorFunctionalSpec extends ContainerGebSpec {

void "Test that an interceptor that redirects works"() {
when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package functionaltests

import grails.testing.mixin.integration.Integration
import spock.lang.*
import geb.spock.*
import grails.plugin.geb.ContainerGebSpec

@Integration(applicationClass = Application)
class ValidationFunctionalSpec extends GebSpec {
class ValidationFunctionalSpec extends ContainerGebSpec {

@Issue('GRAILS-12039')
void "Test validation of an invalid Hibernate entity"() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package functionaltests.chaining

import functionaltests.Application
import geb.spock.*
import grails.plugin.geb.ContainerGebSpec
import grails.testing.mixin.integration.Integration

@Integration(applicationClass = Application)
class ChainingToNamespacedControllersFunctionalSpec extends GebSpec {
class ChainingToNamespacedControllersFunctionalSpec extends ContainerGebSpec {

void "Test chaining to a namespaced controller"() {
when:"A controller action chains to a namespaced controller"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package functionaltests.scaffolding

import functionaltests.Application
import geb.spock.GebSpec
import grails.plugin.geb.ContainerGebSpec
import grails.gorm.transactions.Rollback
import grails.testing.mixin.integration.Integration

@Integration(applicationClass = Application)
@Rollback
class BarFunctionalSpec extends GebSpec {
class BarFunctionalSpec extends ContainerGebSpec {

void "Test that a scaffolded view is resolved correctly"() {
when:
Expand Down
Loading

0 comments on commit 6f827a7

Please sign in to comment.