From 19945877b9c00cc03e7ea8480d94c5ed29a0e56d Mon Sep 17 00:00:00 2001 From: Jj! Date: Mon, 25 Feb 2019 16:38:45 -0600 Subject: [PATCH] [NOISSUE] auto test --- backend/build.gradle | 8 ++++++++ .../tier/shibboleth/admin/ui/SeleniumSIDETest.groovy | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/backend/build.gradle b/backend/build.gradle index b2e738946..36b70d2ed 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -184,6 +184,9 @@ sourceSets { java { srcDirs = [] } + resources { + srcDir new File(buildDir, 'generated/ui') + } } integrationTest { groovy { @@ -197,6 +200,11 @@ sourceSets { } } +task copyUI(type: Copy) { + from tasks.findByPath(':ui:npm_run_buildProd').outputs + into new File(buildDir, 'generated/ui/static') +} + task integrationTest(type: Test) { group = 'verification' description = 'Run various integration tests' diff --git a/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy b/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy index be740b783..9119f1174 100644 --- a/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy +++ b/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy @@ -1,14 +1,20 @@ package edu.internet2.tier.shibboleth.admin.ui +import edu.internet2.tier.shibboleth.admin.ui.controller.BadJSONMetadataSourcesUiDefinitionControllerIntegrationTests import jp.vmi.selenium.selenese.Main import jp.vmi.selenium.selenese.Runner import jp.vmi.selenium.selenese.config.DefaultConfig import org.springframework.beans.factory.annotation.Value import org.springframework.boot.test.context.SpringBootTest +import org.springframework.context.annotation.ComponentScan +import org.springframework.context.annotation.FilterType +import org.springframework.test.context.ActiveProfiles import spock.lang.Specification import spock.lang.Unroll @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = [ShibbolethUiApplication]) +@ComponentScan(excludeFilters = [@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = [BadJSONMetadataSourcesUiDefinitionControllerIntegrationTests.Config, BadJSONMetadataSourcesUiDefinitionControllerIntegrationTests])]) +@ActiveProfiles(['dev']) class SeleniumSIDETest extends Specification { @Value('${local.server.port}') int randomPort