Skip to content

Commit

Permalink
Merged feature/shibui-2393 into feature/shibui-2393-testbed
Browse files Browse the repository at this point in the history
  • Loading branch information
chasegawa committed Nov 16, 2022
2 parents b9122ee + 9ee8e2d commit 4120c12
Show file tree
Hide file tree
Showing 139 changed files with 4,255 additions and 794 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -415,3 +415,8 @@ beacon/spring/out
/a.xml
/application.yml
/backend/src/test/resources/conf/deletem.xml
/testbed/authentication/shibui/saml-signing-cert.crt
/testbed/authentication/shibui/saml-signing-cert.key
/testbed/authentication/shibui/saml-signing-cert.pem
/testbed/authentication/shibui/samlKeystore.jks
/testbed/authentication/shibui/sp-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import edu.internet2.tier.shibboleth.admin.ui.domain.filters.EntityAttributesFil
import edu.internet2.tier.shibboleth.admin.ui.domain.filters.EntityRoleWhiteListFilter
import edu.internet2.tier.shibboleth.admin.ui.domain.filters.NameIdFormatFilter
import edu.internet2.tier.shibboleth.admin.ui.domain.filters.NameIdFormatFilterTarget
import edu.internet2.tier.shibboleth.admin.ui.domain.filters.SignatureValidationFilter
import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.DynamicHttpMetadataResolver
import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.FileBackedHttpMetadataResolver
import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.FilesystemMetadataResolver
Expand All @@ -19,13 +18,9 @@ import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.MetadataResolver
import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.RegexScheme
import edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.TemplateScheme
import edu.internet2.tier.shibboleth.admin.ui.repository.MetadataResolverRepository

import edu.internet2.tier.shibboleth.admin.ui.service.MetadataResolverVersionService
import edu.internet2.tier.shibboleth.admin.ui.util.TestObjectGenerator
import edu.internet2.tier.shibboleth.admin.util.AttributeUtility

import org.apache.commons.lang3.RandomStringUtils

import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.boot.test.web.client.TestRestTemplate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ import javax.persistence.EntityManager

import static edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.HttpMetadataResolverAttributes.HttpCachingType.file
import static edu.internet2.tier.shibboleth.admin.ui.domain.resolvers.HttpMetadataResolverAttributes.HttpCachingType.none
import static edu.internet2.tier.shibboleth.admin.ui.repository.envers.EnversTestsSupport.*
import static edu.internet2.tier.shibboleth.admin.ui.repository.envers.EnversTestsSupport.getModifiedEntityNames
import static edu.internet2.tier.shibboleth.admin.ui.repository.envers.EnversTestsSupport.getRevisionEntityForRevisionIndex
import static edu.internet2.tier.shibboleth.admin.ui.repository.envers.EnversTestsSupport.getTargetEntityForRevisionIndex
import static edu.internet2.tier.shibboleth.admin.ui.repository.envers.EnversTestsSupport.updateAndGetRevisionHistoryOfMetadataResolver

/**
* Testing metadata resolver envers versioning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@

package com.sebuilder.interpreter.webdriverfactory;

import java.io.File;
import java.util.HashMap;
import org.openqa.selenium.firefox.FirefoxBinary;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

import java.io.File;
import java.util.HashMap;

public class Firefox implements WebDriverFactory {
/**
* @param config Key/value pairs treated as required capabilities, with the exception of:
Expand All @@ -50,4 +51,4 @@ public RemoteWebDriver make(HashMap<String, String> config) {
options.setBinary(fb);
return new FirefoxDriver(options);
}
}
}
66 changes: 32 additions & 34 deletions backend/src/integration/groovy/jp/vmi/selenium/selenese/Runner.java
Original file line number Diff line number Diff line change
@@ -1,38 +1,7 @@
package jp.vmi.selenium.selenese;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Deque;
import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.output.NullOutputStream;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.FastDateFormat;
import org.openqa.selenium.Alert;
import org.openqa.selenium.HasCapabilities;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.remote.Augmenter;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.assertthat.selenium_shutterbug.core.Shutterbug;
import com.assertthat.selenium_shutterbug.utils.web.ScrollStrategy;

import jp.vmi.html.result.HtmlResult;
import jp.vmi.html.result.HtmlResultHolder;
import jp.vmi.junit.result.JUnitResult;
Expand All @@ -55,9 +24,38 @@
import jp.vmi.selenium.selenese.utils.MouseUtils;
import jp.vmi.selenium.selenese.utils.PathUtils;
import jp.vmi.selenium.webdriver.WebDriverPreparator;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.output.NullOutputStream;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.FastDateFormat;
import org.openqa.selenium.Alert;
import org.openqa.selenium.HasCapabilities;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.remote.Augmenter;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Deque;
import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import static jp.vmi.selenium.selenese.result.Unexecuted.*;
import static org.openqa.selenium.remote.CapabilityType.*;
import static jp.vmi.selenium.selenese.result.Unexecuted.UNEXECUTED;
import static org.openqa.selenium.remote.CapabilityType.TAKES_SCREENSHOT;

/**
* Provide Java API to run Selenese script.
Expand Down Expand Up @@ -851,4 +849,4 @@ public void unhighlight() {
void setupMaxTimeTimer(long maxTime) {
this.maxTimeTimer = new MaxTimeActiveTimer(maxTime);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,24 @@

package jp.vmi.selenium.selenese.command;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

import org.apache.commons.io.FilenameUtils;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.io.TemporaryFilesystem;

import com.google.common.io.Resources;

import jp.vmi.selenium.selenese.Context;
import jp.vmi.selenium.selenese.result.Error;
import jp.vmi.selenium.selenese.result.Result;
import jp.vmi.selenium.selenese.result.Warning;
import org.apache.commons.io.FilenameUtils;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.io.TemporaryFilesystem;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

import static jp.vmi.selenium.selenese.command.ArgumentType.*;
import static jp.vmi.selenium.selenese.result.Success.*;
import static jp.vmi.selenium.selenese.command.ArgumentType.LOCATOR;
import static jp.vmi.selenium.selenese.command.ArgumentType.VALUE;
import static jp.vmi.selenium.selenese.result.Success.SUCCESS;

/**
* Re-implementation of AttachFile.
Expand Down Expand Up @@ -109,4 +108,4 @@ protected Result executeImpl(Context context, String... curArgs) {
element.sendKeys(outputTo.getAbsolutePath());
return SUCCESS;
}
}
}
2 changes: 1 addition & 1 deletion backend/src/integration/resources/SHIBUI-1334-1.side
Original file line number Diff line number Diff line change
Expand Up @@ -2748,7 +2748,7 @@
"id": "bde2bbbb-df66-4e07-a770-ec9125fe3e81",
"comment": "",
"command": "pause",
"target": "7000",
"target": "10000",
"targets": [],
"value": ""
}, {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/integration/resources/SHIBUI-1407-1.side
Original file line number Diff line number Diff line change
Expand Up @@ -2514,7 +2514,7 @@
"id": "39637add-5eb4-40d0-b840-8eb1972ede0f",
"comment": "",
"command": "pause",
"target": "10000",
"target": "15000",
"targets": [],
"value": ""
}, {
Expand Down
16 changes: 16 additions & 0 deletions backend/src/integration/resources/SHIBUI-1503-1.side
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,22 @@
["xpath=//div[4]/a", "xpath:position"]
],
"value": ""
}, {
"id": "a43898de-b92d-443e-8686-fba526f403ec",
"comment": "",
"command": "click",
"target": "id=enable-btn",
"targets": [
["id=enable-btn", "id"],
["linkText=Enable Metadata Sources1", "linkText"],
["css=#enable-btn", "css:finder"],
["xpath=//a[@id='enable-btn']", "xpath:attributes"],
["xpath=//div[@id='root']/div/main/div/section/div/div[2]/div/div/a", "xpath:idRelative"],
["xpath=//a[contains(@href, '/dashboard/admin/actions/enable')]", "xpath:href"],
["xpath=//div[2]/div/div/a", "xpath:position"],
["xpath=//a[contains(.,'Enable Metadata Sources1')]", "xpath:innerText"]
],
"value": ""
}, {
"id": "b1a8c4b1-d164-4f32-adb3-6cfb76951f28",
"comment": "",
Expand Down
16 changes: 16 additions & 0 deletions backend/src/integration/resources/SHIBUI-1503-2.side
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,22 @@
"target": "css=.nav-item > .d-flex",
"targets": [],
"value": ""
}, {
"id": "1f9a1cc1-00d5-4ecd-a0d1-3cec1683286d",
"comment": "",
"command": "click",
"target": "id=user-access-btn",
"targets": [
["id=user-access-btn", "id"],
["linkText=User Access Request2", "linkText"],
["css=#user-access-btn", "css:finder"],
["xpath=//a[@id='user-access-btn']", "xpath:attributes"],
["xpath=//div[@id='root']/div/main/div/section/div/div[2]/div/div[3]/a", "xpath:idRelative"],
["xpath=//a[contains(@href, '/dashboard/admin/actions/useraccess')]", "xpath:href"],
["xpath=//div[2]/div/div[3]/a", "xpath:position"],
["xpath=//a[contains(.,'User Access Request2')]", "xpath:innerText"]
],
"value": ""
}, {
"id": "a98143b5-647f-4e7e-b920-f6e6875d7372",
"comment": "",
Expand Down
38 changes: 19 additions & 19 deletions backend/src/integration/resources/SHIBUI-1503-3.side
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@
"id": "659e4909-239b-4895-aa54-8bf3a6bd57cd",
"comment": "",
"command": "waitForElementVisible",
"target": "xpath=//table/tbody/tr[td[.='none2']]",
"target": "xpath=//table/tbody/tr[td[.='Approver']]",
"targets": [],
"value": "30000"
}, {
"id": "dc06ff49-c076-4f60-95d1-a42514cc6038",
"comment": "",
"command": "select",
"target": "xpath=//table/tbody/tr[td[.='none2']]/td[4]/select",
"target": "xpath=//table/tbody/tr[td[.='Approver']]/td[4]/select",
"targets": [],
"value": "label=ROLE_USER"
}, {
Expand Down Expand Up @@ -168,7 +168,7 @@
["xpath=//input[@name='username']", "xpath:attributes"],
["xpath=//input", "xpath:position"]
],
"value": "none2"
"value": "Approver"
}, {
"id": "c8bf8ea5-1f75-4a40-aca4-9dfa6a6056dc",
"comment": "",
Expand All @@ -180,7 +180,7 @@
["xpath=//input[@name='password']", "xpath:attributes"],
["xpath=//tr[2]/td[2]/input", "xpath:position"]
],
"value": "none2pass"
"value": "password"
}, {
"id": "ba66c45f-2436-4fe7-a5a9-31b55ffe8118",
"comment": "",
Expand Down Expand Up @@ -214,21 +214,21 @@
["xpath=//a[contains(.,'Metadata Sources')]", "xpath:innerText"]
],
"value": "Metadata Sources"
},{
"id": "4ec2c493-85e4-403b-9b09-031c5728f498",
"comment": "",
"command": "open",
"target": "/api/heheheheheheheWipeout",
"targets": [],
"value": ""
}, {
"id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4",
"comment": "",
"command": "assertText",
"target": "css=body",
"targets": [],
"value": "yes, you did it"
}]
}, {
"id": "4ec2c493-85e4-403b-9b09-031c5728f498",
"comment": "",
"command": "open",
"target": "/api/heheheheheheheWipeout",
"targets": [],
"value": ""
}, {
"id": "e074980a-8f21-4c22-8412-c4b6fcdcd1a4",
"comment": "",
"command": "assertText",
"target": "css=body",
"targets": [],
"value": "yes, you did it"
}]
}],
"suites": [{
"id": "173aaf44-c763-416e-ab3c-d5afd5ffcd29",
Expand Down
13 changes: 9 additions & 4 deletions backend/src/integration/resources/SHIBUI-1674-2.side
Original file line number Diff line number Diff line change
Expand Up @@ -984,17 +984,22 @@
"id": "aea0e033-111e-4a5d-8038-ec222786a695",
"comment": "",
"command": "mouseOver",
"target": "css=.row:nth-child(4) .svg-inline--fa:nth-child(2)",
"target": "css=#root_metadataFilters_2_removeEmptyEntitiesDescriptors-group .info-icon",
"targets": [
["css=.row:nth-child(4) .svg-inline--fa:nth-child(2)", "css:finder"]
["css=#root_metadataFilters_2_removeEmptyEntitiesDescriptors-group .info-icon", "css:finder"],
["xpath=(//button[@type='button'])[13]", "xpath:attributes"],
["xpath=//div[@id='root_metadataFilters_2_removeEmptyEntitiesDescriptors-group']/div/div/div/label/span/button", "xpath:idRelative"],
["xpath=//div[4]/div/div/div/div/div/label/span/button", "xpath:position"]
],
"value": ""
}, {
"id": "80e0d456-3951-4858-8423-7e04d6debb96",
"comment": "",
"command": "assertText",
"target": "css=div[role=\"tooltip\"]",
"targets": [],
"targets": [
["css=#root_metadataFilters_2_removeRolelessEntityDescriptors-group path", "css:finder"]
],
"value": "Controls whether to keep entities descriptors that contain no entity descriptors. Note: If this attribute is set to false, the resulting output may not be schema-valid since an <md:EntitiesDescriptor> element must include at least one child element, either an <md:EntityDescriptor> element or an <md:EntitiesDescriptor> element."
}, {
"id": "148a84ef-0353-425d-9a63-79ccaa01478d",
Expand Down Expand Up @@ -1337,7 +1342,7 @@
"command": "assertText",
"target": "css=div[role=\"tooltip\"]",
"targets": [],
"value": "Whether to remove any existing formats from a role if any are added by the filter (unmodified roles will be untouched regardless of this setting)"
"value": "Whether to use the SHA1 Signing Algorithm. In cryptography, SHA-1 (Secure Hash Algorithm 1) is cryptographically broken but still widely used. It takes an input and produces a 160-bit (20-byte) hash value."
}, {
"id": "59d268fc-f9ba-4c9c-b412-f17ca72b67d1",
"comment": "",
Expand Down
Loading

0 comments on commit 4120c12

Please sign in to comment.