Skip to content

Commit 2c07bdf

Browse files
committed
- getting functional tests running again
1 parent 7f503ce commit 2c07bdf

16 files changed

+871
-584
lines changed

.github/workflows/build.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,10 @@ jobs:
3434
- name: Validate Gradle wrapper
3535
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
3636

37-
- name: run _Events target
37+
- name: Run tests and jacoco coverage report with Gradle
3838
uses: gradle/gradle-build-action@v2.4.2
3939
with:
40-
arguments: _Events
41-
42-
# - name: Run tests and jacoco coverage report with Gradle
43-
# uses: gradle/gradle-build-action@v2.4.2
44-
# with:
45-
# arguments: -PenableJacoco=true check
40+
arguments: -PenableJacoco=true check
4641

4742
- name: Run javascript unit tests
4843
run: node_modules/karma/bin/karma start karma.conf.js --single-run --browsers ChromeHeadless

grails-app/conf/application.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,13 @@ grails:
8989
staticparts: none
9090

9191
userProfile:
92-
userIdAttribute: "username"
92+
userIdAttribute: "username"
93+
94+
---
95+
environments:
96+
test:
97+
server:
98+
port: "8087"
99+
spring:
100+
autoconfigure:
101+
exclude: "au.org.ala.ws.security.AlaWsSecurityConfiguration"

package-lock.json

+832-574
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/integration-test/groovy/au/org/ala/ecodata/forms/ComputedValuesSpec.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ package au.org.ala.ecodata.forms
22

33
import geb.spock.GebReportingSpec
44
import grails.testing.mixin.integration.Integration
5+
import org.springframework.boot.test.context.SpringBootTest
56
import pages.PreviewPage
67
@Integration
8+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
79
class ComputedValuesSpec extends GebReportingSpec {
810

911
def "computed values are evaluated correctly"() {

src/integration-test/groovy/au/org/ala/ecodata/forms/ConstraintsSpec.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import geb.module.Checkbox
44
import geb.module.Select
55
import geb.spock.GebReportingSpec
66
import grails.testing.mixin.integration.Integration
7+
import org.springframework.boot.test.context.SpringBootTest
78
import pages.PreviewPage
89

910
@Integration
11+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
1012
class ConstraintsSpec extends GebReportingSpec {
1113

1214
def "Constraints can be specified such that each constraint may be selected only once on a form"() {

src/integration-test/groovy/au/org/ala/ecodata/forms/DateSpec.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ package au.org.ala.ecodata.forms
22

33
import geb.spock.GebReportingSpec
44
import grails.testing.mixin.integration.Integration
5+
import org.springframework.boot.test.context.SpringBootTest
56
import pages.PreviewPage
67

78
@Integration
9+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
810
class DateSpec extends GebReportingSpec {
911

1012
def "We can enter dates via the date or simpleDate view types"() {

src/integration-test/groovy/au/org/ala/ecodata/forms/FeatureMapSpec.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ package au.org.ala.ecodata.forms
22

33
import geb.spock.GebReportingSpec
44
import grails.testing.mixin.integration.Integration
5+
import org.springframework.boot.test.context.SpringBootTest
56
import pages.PreviewPage
67

78
@Integration
9+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
810
class FeatureMapSpec extends GebReportingSpec {
911

1012

src/integration-test/groovy/au/org/ala/ecodata/forms/GeoMapSpec.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package au.org.ala.ecodata.forms
22

33
import geb.spock.GebReportingSpec
44
import grails.testing.mixin.integration.Integration
5+
import org.springframework.boot.test.context.SpringBootTest
56
import pages.PreviewPage
67

78
/*
@@ -22,6 +23,7 @@ import pages.PreviewPage
2223
*/
2324

2425
@Integration
26+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
2527
class GeoMapSpec extends GebReportingSpec {
2628
def "GeoMap smoke test" () {
2729
when:

src/integration-test/groovy/au/org/ala/ecodata/forms/ImageTypeSpec.groovy

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
package au.org.ala.ecodata.forms
22

33
import geb.spock.GebReportingSpec
4+
import grails.testing.mixin.integration.Integration
5+
import org.springframework.boot.test.context.SpringBootTest
46
import pages.PreviewPage
5-
7+
@Integration
8+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
69
class ImageTypeSpec extends GebReportingSpec {
710

811
def "The default behaviour of the view mode of the image view type is to show metadata on hover"() {

src/integration-test/groovy/au/org/ala/ecodata/forms/MultiInputSpec.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package au.org.ala.ecodata.forms
22

33
import geb.spock.GebReportingSpec
44
import grails.testing.mixin.integration.Integration
5+
import org.springframework.boot.test.context.SpringBootTest
56
import pages.PreviewPage
67

78
/*
@@ -21,6 +22,7 @@ import pages.PreviewPage
2122
* Created by Temi on 26/11/19.
2223
*/
2324
@Integration
25+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
2426
class MultiInputSpec extends GebReportingSpec{
2527
def "multi input tests"() {
2628
when:

src/integration-test/groovy/au/org/ala/ecodata/forms/Select2Spec.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ package au.org.ala.ecodata.forms
22

33
import geb.spock.GebReportingSpec
44
import grails.testing.mixin.integration.Integration
5+
import org.springframework.boot.test.context.SpringBootTest
56
import pages.PreviewPage
67

78
@Integration
9+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
810
class Select2Spec extends GebReportingSpec {
911

1012
def "We can enter data into select2 dropdowns"() {

src/integration-test/groovy/au/org/ala/ecodata/forms/SelectOneSpec.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ package au.org.ala.ecodata.forms
33
import geb.module.Select
44
import geb.spock.GebReportingSpec
55
import grails.testing.mixin.integration.Integration
6+
import org.springframework.boot.test.context.SpringBootTest
67
import pages.PreviewPage
78

89
@Integration
10+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
911
class SelectOneSpec extends GebReportingSpec {
1012

1113
def "We can enter data in selectOne widgets"() {

src/integration-test/groovy/au/org/ala/ecodata/forms/TableFooterSpec.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ package au.org.ala.ecodata.forms
22

33
import geb.spock.GebReportingSpec
44
import grails.testing.mixin.integration.Integration
5+
import org.springframework.boot.test.context.SpringBootTest
56
import pages.PreviewPage
67

78
@Integration
9+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
810
class TableFooterSpec extends GebReportingSpec {
911

1012
def "Table footers can be displayed"() {

src/integration-test/groovy/au/org/ala/ecodata/forms/TableSpec.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ package au.org.ala.ecodata.forms
22

33
import geb.spock.GebReportingSpec
44
import grails.testing.mixin.integration.Integration
5+
import org.springframework.boot.test.context.SpringBootTest
56
import pages.PreviewPage
67

78
@Integration
9+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
810
class TableSpec extends GebReportingSpec {
911

1012
def "Tables can be displayed correctly in edit mode"() {

src/integration-test/groovy/au/org/ala/ecodata/forms/TestSpec.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ package au.org.ala.ecodata.forms
22

33
import geb.spock.GebReportingSpec
44
import grails.testing.mixin.integration.Integration
5+
import org.springframework.boot.test.context.SpringBootTest
56
import pages.PreviewPage
67

78

89
@Integration
10+
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
911
class TestSpec extends GebReportingSpec {
1012

1113
def grailsApplication

src/integration-test/resources/GebConfig.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (!System.getProperty("webdriver.chrome.driver")) {
66
System.setProperty("webdriver.chrome.driver", "node_modules/chromedriver/bin/chromedriver")
77
}
88
driver = { new ChromeDriver() }
9-
baseUrl = 'http://devt.ala.org.au:8087/'
9+
baseUrl = 'http://localhost:8087/'
1010
atCheckWaiting = true
1111
waiting {
1212
timeout = 20

0 commit comments

Comments
 (0)