Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grails 7 test fixes #262

Merged
merged 1 commit into from
Oct 31, 2024
Merged
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
6 changes: 0 additions & 6 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
],
"groupName": "groovy monorepo"
},
{
"matchPackagePatterns": [
"^org\\.seleniumhq\\.selenium"
],
"groupName": "selenium monorepo"
},
{
"matchPackageNames": [
"org.grails.plugins:views-json",
Expand Down
1 change: 1 addition & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java=17.0.12-librca
2 changes: 0 additions & 2 deletions app1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ buildscript {
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:$assetPipelineVersion"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
}
}

Expand All @@ -17,7 +16,6 @@ apply plugin: "war"
apply plugin: "asset-pipeline"
apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
apply plugin: "com.github.erdi.webdriver-binaries"

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

import grails.testing.mixin.integration.Integration
import spock.lang.PendingFeature
import spock.lang.Specification

@Integration(applicationClass = Application)
Expand Down
2 changes: 0 additions & 2 deletions app2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
}
}

Expand All @@ -13,7 +12,6 @@ group "app2"

apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
apply plugin: "com.github.erdi.webdriver-binaries"

dependencyManagement {
imports {
Expand Down
2 changes: 0 additions & 2 deletions app3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
}
}

Expand All @@ -13,7 +12,6 @@ group "app3"

apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
apply plugin: "com.github.erdi.webdriver-binaries"

dependencyManagement {
imports {
Expand Down
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ subprojects {
repositories {
maven { url "https://repo.grails.org/grails/core" }
mavenCentral()
if(groovyVersion.endsWith('-SNAPSHOT')) {
maven {
name = 'ASF Snapshot repo'
url = 'https://repository.apache.org/content/repositories/snapshots'
}
}
}

tasks.withType(Test) {
Expand Down
3 changes: 1 addition & 2 deletions datasources/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
}
}

Expand All @@ -13,7 +12,7 @@ group "datasources"

apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
apply plugin: "com.github.erdi.webdriver-binaries"


dependencyManagement {
imports {
Expand Down
2 changes: 0 additions & 2 deletions gorm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
}
}

Expand All @@ -13,7 +12,6 @@ group "gorm"

apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
apply plugin: "com.github.erdi.webdriver-binaries"

dependencyManagement {
imports {
Expand Down
4 changes: 2 additions & 2 deletions gorm/grails-app/domain/gorm/ChildA.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gorm
// waiting on workaround for https://issues.apache.org/jira/browse/GROOVY-5106
class ChildA /*extends AbstractParent*/ {

class ChildA extends AbstractParent {

int ageA

Expand Down
3 changes: 1 addition & 2 deletions gorm/grails-app/domain/gorm/ChildB.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package gorm

// waiting on workaround for https://issues.apache.org/jira/browse/GROOVY-5106
class ChildB /*extends AbstractParent*/ {
class ChildB extends AbstractParent {

int ageB
static constraints = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import spock.lang.*
@Rollback
class AbstractParentSpec extends Specification {

@PendingFeature(reason = 'count not equal to 2')
void "Test that persisting a domain class with an abstract parent works"() {
when:"An entity with an abstract parent is persisted"
new ChildA(name:"A", ageA:10).save(flush:true)
Expand Down
11 changes: 2 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
assetPipelineVersion=5.0.1
gebVersion=7.0
# used to pull latest -SNAPSHOT version
grailsCoreBranch=7.0.x
grailsGradlePluginVersion=7.0.0-SNAPSHOT
grailsSitemesh3Version=7.0.0-SNAPSHOT
# used by grails-gradle-plugin to force the groovy version
groovyVersion=4.0.23
groovyVersion=4.0.24-SNAPSHOT
jakartaXmlBindVersion=4.0.2

# no longer comes from grails-bom
micronautVersion=4.6.5
micronautSerdeJacksonVersion=2.11.0

seleniumVersion=4.25.0
gebPluginVersion=5.0.0-SNAPSHOT
servletApiVersion=6.0.0
springSecurityCoreVersion=7.0.0-SNAPSHOT
# required for org.grails.plugins:views-gradle version
viewsVersion=4.0.0-SNAPSHOT

webdriverBinariesVersion=3.2
chromeDriverVersion=126.0.6478.126
geckodriverVersion=0.32.2
seleniumSafariDriverVersion=4.25.0

org.gradle.caching=true
2 changes: 1 addition & 1 deletion gradle/geb.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dependencies {
integrationTestImplementation testFixtures('org.grails.plugins:geb:5.0.0-SNAPSHOT')
integrationTestImplementation testFixtures("org.grails.plugins:geb:$gebPluginVersion")
}
2 changes: 0 additions & 2 deletions hyphenated/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
}
}

Expand All @@ -13,7 +12,6 @@ group "hyphenated"

apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
apply plugin: "com.github.erdi.webdriver-binaries"

dependencyManagement {
imports {
Expand Down
2 changes: 0 additions & 2 deletions issue-11102/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ buildscript {
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:$assetPipelineVersion"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
}
}

Expand All @@ -16,7 +15,6 @@ apply plugin: "war"
apply plugin: "asset-pipeline"
apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
apply plugin: "com.github.erdi.webdriver-binaries"

assets {
minifyJs = true
Expand Down
2 changes: 0 additions & 2 deletions issue-698-domain-save-npe/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
}
}

Expand All @@ -13,7 +12,6 @@ group "grails301.domain.save.npe"

apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
apply plugin: "com.github.erdi.webdriver-binaries"

dependencyManagement {
imports {
Expand Down
31 changes: 3 additions & 28 deletions micronaut/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ buildscript {
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "org.grails.plugins:hibernate5"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:$assetPipelineVersion"
}
}
Expand All @@ -17,7 +16,6 @@ apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"com.github.erdi.webdriver-binaries"
apply plugin:"org.grails.grails-gsp"
apply plugin:"com.bertramlabs.asset-pipeline"

Expand Down Expand Up @@ -63,12 +61,6 @@ dependencies {
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.mockito:mockito-core"
testImplementation "org.grails:grails-web-testing-support"
testImplementation "org.grails.plugins:geb"
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-api:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-support:$seleniumVersion"
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
}

bootRun {
Expand All @@ -82,26 +74,9 @@ bootRun {
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}

webdriverBinaries {
if (!System.getenv().containsKey('CI')) {
chromedriver "$chromeDriverVersion"
geckodriver "$geckodriverVersion"
}
}

tasks.withType(Test) {
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
if (!System.getenv().containsKey('CI')) {
systemProperty 'webdriver.chrome.driver', System.getProperty('webdriver.chrome.driver')
systemProperty 'webdriver.gecko.driver', System.getProperty('webdriver.gecko.driver')
} else {
systemProperty 'webdriver.chrome.driver', "${System.getenv('CHROMEWEBDRIVER')}/chromedriver"
systemProperty 'webdriver.gecko.driver', "${System.getenv('GECKOWEBDRIVER')}/geckodriver"
}
}

assets {
minifyJs = true
minifyCss = true
}
}

apply from: "${rootProject.projectDir}/gradle/geb.gradle"
2 changes: 0 additions & 2 deletions namespaces/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
}
}

Expand All @@ -13,7 +12,6 @@ group "namespaces"

apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
apply plugin: "com.github.erdi.webdriver-binaries"

dependencyManagement {
imports {
Expand Down
Loading