-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP
- Loading branch information
Showing
9 changed files
with
294 additions
and
563 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| package edu.internet2.tier.shibboleth.admin.ui | ||
|
|
||
| import com.sebuilder.interpreter.Script | ||
| import com.sebuilder.interpreter.factory.ScriptFactory | ||
| import com.sebuilder.interpreter.factory.StepTypeFactory | ||
| import com.sebuilder.interpreter.factory.TestRunFactory | ||
| import spock.lang.Specification | ||
| import spock.lang.Unroll | ||
|
|
||
| class SeleniumTest extends Specification { | ||
| @Unroll | ||
| def "#name"() { | ||
| expect: | ||
| ScriptFactory scriptFactory = new ScriptFactory().with { | ||
| it.stepTypeFactory = new StepTypeFactory() | ||
| it.testRunFactory = new TestRunFactory() | ||
| it | ||
| } | ||
| def x = this.class.getResource(file) | ||
| def scripts = scriptFactory.parse(new File(this.class.getResource(file).toURI())) | ||
| for (Script script : scripts) { | ||
| def lastRun = scriptFactory.testRunFactory.createTestRun(script) | ||
| assert lastRun.finish() | ||
| } | ||
|
|
||
| where: | ||
| name | file | ||
| 'Create metadata source from url' | '/CreateMetaDataSourceFromURL.json' | ||
| } | ||
| } |
213 changes: 213 additions & 0 deletions
213
backend/src/integration/resources/CreateMetaDataSourceFromURL.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,213 @@ | ||
| { | ||
| "type": "script", | ||
| "seleniumVersion": "2", | ||
| "formatVersion": 2, | ||
| "steps": [ | ||
| { | ||
| "type": "get", | ||
| "url": "http://localhost:8080" | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#addNewDropdown" | ||
| } | ||
| }, | ||
| { | ||
| "type": "clickElement", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#addNewDropdown" | ||
| } | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "a[href=\"/metadata/resolver/new\"] > translate-i18n" | ||
| } | ||
| }, | ||
| { | ||
| "type": "clickElement", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "a[href=\"/metadata/resolver/new\"] > translate-i18n" | ||
| } | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "i.fa.fa-link" | ||
| } | ||
| }, | ||
| { | ||
| "type": "clickElement", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "i.fa.fa-link" | ||
| } | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#serviceProviderName" | ||
| } | ||
| }, | ||
| { | ||
| "type": "clickElement", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#serviceProviderName" | ||
| } | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#serviceProviderName" | ||
| } | ||
| }, | ||
| { | ||
| "type": "setElementText", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#serviceProviderName" | ||
| }, | ||
| "text": "Create Upload Using Download from XML URL" | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#serviceProviderName" | ||
| } | ||
| }, | ||
| { | ||
| "type": "clickElement", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#serviceProviderName" | ||
| } | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#serviceProviderName" | ||
| } | ||
| }, | ||
| { | ||
| "type": "setElementText", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#serviceProviderName" | ||
| }, | ||
| "text": "Create Upload Using Download from URL" | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#url" | ||
| } | ||
| }, | ||
| { | ||
| "type": "clickElement", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#url" | ||
| } | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#url" | ||
| } | ||
| }, | ||
| { | ||
| "type": "setElementText", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": "#url" | ||
| }, | ||
| "text": "https://signin.aws.amazon.com/static/saml-metadata.xml" | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": ".section-body > upload-resolver-form > .row" | ||
| } | ||
| }, | ||
| { | ||
| "type": "clickElement", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": ".section-body > upload-resolver-form > .row" | ||
| } | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": ".direction" | ||
| } | ||
| }, | ||
| { | ||
| "type": "clickElement", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": ".direction" | ||
| } | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": ".p-3 resolver-item > .card > .card-header > .row > .clearfix > div:nth-of-type(2)" | ||
| } | ||
| }, | ||
| { | ||
| "type": "assertElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": ".p-3 resolver-item > .card > .card-header > .row > .clearfix > div:nth-of-type(2)" | ||
| }, | ||
| "negated": false | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": ".p-3 resolver-item > .card > .card-header > .row > .clearfix > div:nth-of-type(2) > small.d-block" | ||
| } | ||
| }, | ||
| { | ||
| "type": "clickElement", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": ".p-3 resolver-item > .card > .card-header > .row > .clearfix > div:nth-of-type(2) > small.d-block" | ||
| } | ||
| }, | ||
| { | ||
| "type": "waitForElementPresent", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": ".p-3 resolver-item > .card > .collapse > .card-body > .row > div:nth-of-type(1) > .row:nth-of-type(2) > .col:nth-of-type(2)" | ||
| } | ||
| }, | ||
| { | ||
| "type": "assertText", | ||
| "locator": { | ||
| "type": "css selector", | ||
| "value": ".p-3 resolver-item > .card > .collapse > .card-body > .row > div:nth-of-type(1) > .row:nth-of-type(2) > .col:nth-of-type(2)" | ||
| }, | ||
| "text": "urn:amazon:webservices", | ||
| "negated": false | ||
| } | ||
| ] | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| task wrapper(type: Wrapper) { | ||
| gradleVersion = 4.6 | ||
| gradleVersion = '4.8.1' | ||
| } |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| #Tue Sep 12 16:59:56 CDT 2017 | ||
| #Mon Nov 26 11:20:36 CST 2018 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.