Skip to content

Commit

Permalink
- getting functional tests running again
Browse files Browse the repository at this point in the history
  • Loading branch information
temi committed Nov 23, 2023
1 parent 7f503ce commit 2c07bdf
Show file tree
Hide file tree
Showing 16 changed files with 871 additions and 584 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,10 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b

- name: run _Events target
- name: Run tests and jacoco coverage report with Gradle
uses: gradle/gradle-build-action@v2.4.2
with:
arguments: _Events

# - name: Run tests and jacoco coverage report with Gradle
# uses: gradle/gradle-build-action@v2.4.2
# with:
# arguments: -PenableJacoco=true check
arguments: -PenableJacoco=true check

- name: Run javascript unit tests
run: node_modules/karma/bin/karma start karma.conf.js --single-run --browsers ChromeHeadless
Expand Down
11 changes: 10 additions & 1 deletion grails-app/conf/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,13 @@ grails:
staticparts: none

userProfile:
userIdAttribute: "username"
userIdAttribute: "username"

---
environments:
test:
server:
port: "8087"
spring:
autoconfigure:
exclude: "au.org.ala.ws.security.AlaWsSecurityConfiguration"
1,406 changes: 832 additions & 574 deletions package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package au.org.ala.ecodata.forms

import geb.spock.GebReportingSpec
import grails.testing.mixin.integration.Integration
import org.springframework.boot.test.context.SpringBootTest
import pages.PreviewPage
@Integration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
class ComputedValuesSpec extends GebReportingSpec {

def "computed values are evaluated correctly"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import geb.module.Checkbox
import geb.module.Select
import geb.spock.GebReportingSpec
import grails.testing.mixin.integration.Integration
import org.springframework.boot.test.context.SpringBootTest
import pages.PreviewPage

@Integration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
class ConstraintsSpec extends GebReportingSpec {

def "Constraints can be specified such that each constraint may be selected only once on a form"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package au.org.ala.ecodata.forms

import geb.spock.GebReportingSpec
import grails.testing.mixin.integration.Integration
import org.springframework.boot.test.context.SpringBootTest
import pages.PreviewPage

@Integration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
class DateSpec extends GebReportingSpec {

def "We can enter dates via the date or simpleDate view types"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package au.org.ala.ecodata.forms

import geb.spock.GebReportingSpec
import grails.testing.mixin.integration.Integration
import org.springframework.boot.test.context.SpringBootTest
import pages.PreviewPage

@Integration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
class FeatureMapSpec extends GebReportingSpec {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package au.org.ala.ecodata.forms

import geb.spock.GebReportingSpec
import grails.testing.mixin.integration.Integration
import org.springframework.boot.test.context.SpringBootTest
import pages.PreviewPage

/*
Expand All @@ -22,6 +23,7 @@ import pages.PreviewPage
*/

@Integration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
class GeoMapSpec extends GebReportingSpec {
def "GeoMap smoke test" () {
when:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package au.org.ala.ecodata.forms

import geb.spock.GebReportingSpec
import grails.testing.mixin.integration.Integration
import org.springframework.boot.test.context.SpringBootTest
import pages.PreviewPage

@Integration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
class ImageTypeSpec extends GebReportingSpec {

def "The default behaviour of the view mode of the image view type is to show metadata on hover"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package au.org.ala.ecodata.forms

import geb.spock.GebReportingSpec
import grails.testing.mixin.integration.Integration
import org.springframework.boot.test.context.SpringBootTest
import pages.PreviewPage

/*
Expand All @@ -21,6 +22,7 @@ import pages.PreviewPage
* Created by Temi on 26/11/19.
*/
@Integration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
class MultiInputSpec extends GebReportingSpec{
def "multi input tests"() {
when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package au.org.ala.ecodata.forms

import geb.spock.GebReportingSpec
import grails.testing.mixin.integration.Integration
import org.springframework.boot.test.context.SpringBootTest
import pages.PreviewPage

@Integration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
class Select2Spec extends GebReportingSpec {

def "We can enter data into select2 dropdowns"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package au.org.ala.ecodata.forms
import geb.module.Select
import geb.spock.GebReportingSpec
import grails.testing.mixin.integration.Integration
import org.springframework.boot.test.context.SpringBootTest
import pages.PreviewPage

@Integration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
class SelectOneSpec extends GebReportingSpec {

def "We can enter data in selectOne widgets"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package au.org.ala.ecodata.forms

import geb.spock.GebReportingSpec
import grails.testing.mixin.integration.Integration
import org.springframework.boot.test.context.SpringBootTest
import pages.PreviewPage

@Integration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
class TableFooterSpec extends GebReportingSpec {

def "Table footers can be displayed"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package au.org.ala.ecodata.forms

import geb.spock.GebReportingSpec
import grails.testing.mixin.integration.Integration
import org.springframework.boot.test.context.SpringBootTest
import pages.PreviewPage

@Integration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
class TableSpec extends GebReportingSpec {

def "Tables can be displayed correctly in edit mode"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package au.org.ala.ecodata.forms

import geb.spock.GebReportingSpec
import grails.testing.mixin.integration.Integration
import org.springframework.boot.test.context.SpringBootTest
import pages.PreviewPage


@Integration
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
class TestSpec extends GebReportingSpec {

def grailsApplication
Expand Down
2 changes: 1 addition & 1 deletion src/integration-test/resources/GebConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if (!System.getProperty("webdriver.chrome.driver")) {
System.setProperty("webdriver.chrome.driver", "node_modules/chromedriver/bin/chromedriver")
}
driver = { new ChromeDriver() }
baseUrl = 'http://devt.ala.org.au:8087/'
baseUrl = 'http://localhost:8087/'
atCheckWaiting = true
waiting {
timeout = 20
Expand Down

0 comments on commit 2c07bdf

Please sign in to comment.