Skip to content

Commit

Permalink
Merge branch 'for-mary' into misc-update
Browse files Browse the repository at this point in the history
  • Loading branch information
jj committed Mar 11, 2019
2 parents 4fa8337 + 84c0af3 commit 1875a00
Show file tree
Hide file tree
Showing 51 changed files with 7,964 additions and 2,895 deletions.
16 changes: 12 additions & 4 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ dependencies {
compile 'org.sharegov:mjson:1.4.1'

integrationTestCompile 'com.saucelabs:sebuilder-interpreter:1.0.6'
integrationTestCompile 'jp.vmi:selenese-runner-java:3.19.2'
integrationTestCompile 'jp.vmi:selenese-runner-java:3.20.0'

// CSV file support
compile 'com.opencsv:opencsv:4.4'
Expand All @@ -184,19 +184,27 @@ sourceSets {
java {
srcDirs = []
}
resources {
srcDir new File(buildDir, 'generated/ui')
}
}
integrationTest {
groovy {
srcDirs = ['src/integration/groovy']
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
compileClasspath += main.output
runtimeClasspath += main.output
}
resources {
srcDir 'src/integration/resources'
}
}
}

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'
Expand Down Expand Up @@ -307,7 +315,7 @@ dockerRun {
image 'unicon/shibui'
ports '10101:8080'
daemonize true
command '--spring.profiles.include=no-auth,very-dangerous'
command '--spring.profiles.include=very-dangerous,dev'
clean true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,59 @@ package edu.internet2.tier.shibboleth.admin.ui
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.test.annotation.DirtiesContext
import org.springframework.test.context.ActiveProfiles
import spock.lang.Ignore
import spock.lang.Specification
import spock.lang.Unroll

import java.nio.file.Paths

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = [ShibbolethUiApplication])
@ActiveProfiles(['dev'])
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD, methodMode = DirtiesContext.MethodMode.AFTER_METHOD)
class SeleniumSIDETest extends Specification {
@Value('${local.server.port}')
int randomPort

@Ignore
def "Selenium: just run one"() {
setup:
def file = "/SHIBUI-1058_DelegatedAdmin_SubmitSource.side"
def main = new Main()
def config = new DefaultConfig([] as String[]).with {
if (System.properties.getProperty('webdriver.driver')) {
it.driver = System.properties.getProperty('webdriver.driver')
}
it.baseurl = "http://localhost:${this.randomPort}"
it
}
def runner = new Runner()
runner.varsMap.put('xmlUpload', Paths.get(this.class.getResource('/TestUpload.xml').toURI()).toString())
main.setupRunner(runner, config, [] as String[])

expect:
def result = runner.run(file, this.class.getResourceAsStream(file))
runner.finish()

assert result.level.exitCode == 0
}

@Unroll
def "#name"() {
setup:
def main = new Main()
def config = new DefaultConfig([] as String[]).with {
System.properties.contains('')
if (System.properties.getProperty('webdriver.driver')) {
it.driver = System.properties.getProperty('webdriver.driver')
}
it.baseurl = 'http://localhost:10101'
it.baseurl = "http://localhost:${this.randomPort}"
it
}
def runner = new Runner()
runner.varsMap.put('xmlUpload', Paths.get(this.class.getResource('/TestUpload.xml').toURI()).toString())
main.setupRunner(runner, config, [] as String[])

expect:
Expand All @@ -29,18 +65,27 @@ class SeleniumSIDETest extends Specification {
assert result.level.exitCode == 0

where:
name | file
'Create Dynamic HTTP Metadata Resolver' | '/dhmr.side' //passing
'Metadata Source Happy Path Save' | '/MetadataSourceHappyPathSAVE.side' //passing
// 'Metadata Provider Happy Path Save' | '/MetadataProviderHappyPathSAVE.side' // failing (decimal point bug)
// 'Create Filter Entity ID' | '/CreateFilterEntityID.side' // failing (decimal point bug)
// 'Create Filter REGEX' | '/CreateFilterREGEX.side' // failing (decimal point bug)
// 'Create Filter Script' | '/CreateFilterScript.side' // failing (decimal point bug)
// 'Create Metadata Source From XML' | '/CreateMetadataSourceFromXML.side' // failing (Failure: Cannot click <input type=file> elements)
'Create Metadata Source From Copy' | '/CreateMetadataSourceFromCopy.side' //passing
// 'Delete Entity ID Filter' | '/DeleteEntityIDFilter.side' // failing (decimal point bug, possibly also incomplete)
// 'Delete REGEX Filter' | '/DeleteREGEXFilter_Incomplete.side' // incomplete
'Create Metadata Source from URL' | '/CreateMetadataSourceFromURL.side' //passing
// 'Delete Incomplete Source' | '/DeleteIncompleteSource_Incomplete.side' // incomplete
name | file
'Create Dynamic HTTP Metadata Resolver' | '/dhmr.side'
'Metadata Source Happy Path Save' | '/MetadataSourceHappyPathSAVE.side'
'Metadata Provider Happy Path Save' | '/MetadataProviderHappyPathSAVE.side'
'Create Filter Entity ID' | '/CreateFilterEntityID.side'
'Create Filter REGEX' | '/CreateFilterREGEX.side'
'Create Filter Script' | '/CreateFilterScript.side'
'Create Metadata Source From XML' | '/CreateMetadataSourceFromXML.side'
'Create Metadata Source From Copy' | '/CreateMetadataSourceFromCopy.side' // currently does not populate MDUI before copy (causes 400)
'Create Metadata Source from URL' | '/CreateMetadataSourceFromURL.side'
'Delete Entity ID Filter' | '/DeleteEntityIDFilter.side'
'Delete REGEX Filter' | '/DeleteREGEXFilter.side'
'Delete Incomplete Source' | '/DeleteIncompleteSource.side'
'Admin Login' | '/SHIBUI-1031_AdminLogin.side'
'Delegated Admin: SubmitSource' | '/SHIBUI-1058_DelegatedAdmin_SubmitSource.side'
'Create Filesystem Metadata Resolver' | '/CreateFilesystemMetadataResolver.side'
'Create Local Dynamic Metadata Resolver' | '/CreateLocalDynamicMetadataResolver.side'
'Delete Entity Attributes Script Filter' | '/DeleteScriptFilter.side'
'Create and Delete Name ID Format Entity ID Filter' | '/CreateAndDeleteNameIDFormatEntityIDFilter.side'
'Create and Delete Name ID Format Regex Filter' | '/CreateAndDeleteNameIDFormatRegexFilter.side'
'Create and Delete Name ID Format Script Filter' | '/CreateAndDeleteNameIDFormatScriptFilter.side'
'Create and Modify Filter Order' | '/ModifyFilterOrder.side'
}
}

This file was deleted.

Loading

0 comments on commit 1875a00

Please sign in to comment.