Skip to content
This repository has been archived by the owner on Apr 30, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into dependabot/maven/master/io.appium-java-cli…
Browse files Browse the repository at this point in the history
…ent-7.6.0
  • Loading branch information
jason-edstrom authored Oct 22, 2021
2 parents ed0134e + 20e5900 commit b6a8e48
Show file tree
Hide file tree
Showing 6 changed files with 289 additions and 64 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
java-version: 15
- name: Restore Local Maven Cache
uses: actions/[email protected].4
uses: actions/[email protected].6
with:
path: ~/.m2
key: ${{runner.os}}-m2
Expand All @@ -28,7 +28,7 @@ jobs:
with:
profiles: '[{ "id": "sonar", "properties": { "sonar.organization":"magenic", "sonar.host.url":"https://sonarcloud.io", "sonar.login": "${{secrets.SONAR_LOGIN}}" }}]'
- name: Run Unit Tests
uses: GabrielBB/xvfb-action@v1.4
uses: GabrielBB/xvfb-action@v1.5
with:
run: mvn -B -Dtesting verify package --file pom.xml -e -fae -T 1C -Djdk.version=${{matrix.jdk}}
env:
Expand Down Expand Up @@ -57,14 +57,15 @@ jobs:
with:
java-version: 11
- name: Restore Local Maven Cache
uses: actions/[email protected].4
uses: actions/[email protected].6
with:
path: ~/.m2
key: ${{runner.os}}-m2
- name: Run Checkstyle
run: mvn -B validate --file pom.xml -e -fae
labels:
name: Pull Request Labels
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Label Pull Request
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- name: Get release
id: get_release
uses: bruceadams/[email protected].2
uses: bruceadams/[email protected].3
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Formatting Version Tag
Expand All @@ -41,7 +41,7 @@ jobs:
with:
java-version: 15
- name: Maven Cache
uses: actions/[email protected].4
uses: actions/[email protected].6
with:
path: ~/.m2
key: ${{runner.os}}-m2
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Print out version number from needs
run: echo "${{env.VERSION}}"
- name: Set Version to ${{env.VERSION}} and Run Unit Tests
uses: GabrielBB/xvfb-action@v1.4
uses: GabrielBB/xvfb-action@v1.5
with:
run: mvn -Drevision="${{env.VERSION}}" -Dtesting -T 1C verify install -B -e -f pom.xml -fae -Djdk.version=${{env.JDK}}
env:
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
with:
java-version: 15
- name: Maven Cache
uses: actions/[email protected].4
uses: actions/[email protected].6
with:
path: ~/.m2
key: ${{runner.os}}-m2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- name: Draft Release Notes
id: release-drafter
uses: release-drafter/release-drafter@v5.14.0
uses: release-drafter/release-drafter@v5.15.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: bash_v
Expand All @@ -36,7 +36,7 @@ jobs:
with:
java-version: ${{env.JDK}}
- name: Maven Cache
uses: actions/[email protected].4
uses: actions/[email protected].6
with:
path: ~/.m2
key: ${{runner.os}}-m2
Expand All @@ -45,7 +45,7 @@ jobs:
with:
profiles: '[{ "id": "sonar", "properties": { "sonar.organization":"magenic", "sonar.host.url":"https://sonarcloud.io", "sonar.login": "${{secrets.SONAR_LOGIN}}"}}]'
- name: Set Version to ${{env.VERSION}}-SNAPSHOT and Run Unit Tests
uses: GabrielBB/xvfb-action@v1.4
uses: GabrielBB/xvfb-action@v1.5
with:
run: mvn -Drevision="${{env.VERSION}}-SNAPSHOT" -B -Dtesting verify install --file pom.xml -e -fae -T 1C -Djdk.version=${{env.JDK}}
env:
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
# with:
# java-version: ${{env.JDK}}
# - name: Maven Cache
# uses: actions/[email protected].4
# uses: actions/[email protected].6
# with:
# path: ~/.m2
# key: ${{runner.os}}-m2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static void checkAccessibility(WebDriver webDriver, Logger logger, boolea
* @param logger Where you want the check logged to
* @param checkType What kind of check is being run
* @param getResults Function for getting Axe results
* @param loggingLevel What level should log check take,
* @param loggingLevel What level should the logging check take,
* this gets used if the check doesn't throw an exception
* @param throwOnResults Throw error if any results are found
*/
Expand All @@ -100,7 +100,7 @@ public static void checkAccessibility(WebDriver webDriver, Logger logger, String
* Run axe accessibility and log the results.
* @param webDriver The web driver that is on the page you want to run the accessibility check on
* @param logger Where you want the check logged to
* @param loggingLevel What level should log check take,
* @param loggingLevel What level should the logging check take,
* this gets used if the check doesn't throw an exception
*/
public static void checkAccessibilityPasses(WebDriver webDriver, Logger logger, MessageType loggingLevel) {
Expand All @@ -112,7 +112,7 @@ public static void checkAccessibilityPasses(WebDriver webDriver, Logger logger,
* Run axe accessibility and log the results.
* @param webDriver The web driver that is on the page you want to run the accessibility check on
* @param logger Where you want the check logged to
* @param loggingLevel What level should log check take,
* @param loggingLevel What level should the logging check take,
* this gets used if the check doesn't throw an exception
* @param throwOnInapplicable Should inapplicable cause an exception to be thrown
*/
Expand All @@ -126,7 +126,7 @@ public static void checkAccessibilityInapplicable(WebDriver webDriver, Logger lo
* Run axe accessibility and log the results.
* @param webDriver The web driver that is on the page you want to run the accessibility check on
* @param logger Where you want the check logged to
* @param loggingLevel What level should log check take,
* @param loggingLevel What level should the logging check take,
* this gets used if the check doesn't throw an exception
* @param throwOnIncomplete Should incomplete cause an exception to be thrown
*/
Expand All @@ -140,7 +140,7 @@ public static void checkAccessibilityIncomplete(WebDriver webDriver, Logger logg
* Run axe accessibility and log the results.
* @param webDriver The web driver that is on the page you want to run the accessibility check on
* @param logger Where you want the check logged to
* @param loggingLevel What level should log check take,
* @param loggingLevel What level should the logging check take,
* this gets used if the check doesn't throw an exception
* @param throwOnViolation Should violations cause an exception to be thrown
*/
Expand All @@ -154,6 +154,8 @@ public static void checkAccessibilityViolations(WebDriver webDriver, Logger logg
* Create an HTML accessibility report for an entire web page.
* @param testObject The TestObject to associate the report with
* @param throwOnViolation Should violations cause an exception to be thrown
* @throws IOException If an IO exception is thrown
* @throws ParseException If a parse exception is thrown
*/
public static void createAccessibilityHtmlReport(SeleniumTestObject testObject,
boolean throwOnViolation) throws IOException, ParseException {
Expand All @@ -165,6 +167,8 @@ public static void createAccessibilityHtmlReport(SeleniumTestObject testObject,
* Create an HTML accessibility report for an entire web page.
* @param testObject The TestObject to associate the report with
* @param throwOnViolation Should violations cause an exception to be thrown
* @throws IOException If an IO exception is thrown
* @throws ParseException If a parse exception is thrown
*/
public static void createAccessibilityHtmlReport(SeleniumTestObject testObject,
boolean throwOnViolation, Set<ResultType> requestedResult) throws IOException, ParseException {
Expand All @@ -176,6 +180,8 @@ public static void createAccessibilityHtmlReport(SeleniumTestObject testObject,
* Create an HTML accessibility report for an entire web page.
* @param testObject The TestObject to associate the report with
* @param throwOnViolation Should violations cause an exception to be thrown
* @throws IOException If an IO exception is thrown
* @throws ParseException If a parse exception is thrown
*/
public static void createAccessibilityHtmlReport(SeleniumTestObject testObject,
WebElement element, boolean throwOnViolation) throws IOException, ParseException {
Expand All @@ -188,6 +194,8 @@ public static void createAccessibilityHtmlReport(SeleniumTestObject testObject,
* Create an HTML accessibility report for an entire web page.
* @param testObject The TestObject to associate the report with
* @param throwOnViolation Should violations cause an exception to be thrown
* @throws IOException If an IO exception is thrown
* @throws ParseException If a parse exception is thrown
*/
public static void createAccessibilityHtmlReport(SeleniumTestObject testObject,
WebElement element, boolean throwOnViolation, Set<ResultType> resultRequested)
Expand All @@ -196,11 +204,28 @@ public static void createAccessibilityHtmlReport(SeleniumTestObject testObject,
() -> new AxeBuilder().analyze(testObject.getWebDriver(), element), throwOnViolation, resultRequested);
}

/**
* Create HTML accessibility report for an entire web page.
* @param testObject The TestObject to associate the report with
* @param result The result object
* @param throwOnViolation Should violations cause an exception to be thrown
* @throws IOException If an IO exception is thrown
* @throws ParseException If a parse exception is thrown
*/
public static void createAccessibilityHtmlReport(SeleniumTestObject testObject, Results result,
boolean throwOnViolation) throws IOException, ParseException {
createAccessibilityHtmlReport(testObject, result, throwOnViolation, EnumSet.allOf(ResultType.class));
}

/**
* Create HTML accessibility report for an entire web page.
* @param testObject The TestObject to associate the report with
* @param result The result object
* @param throwOnViolation Should violations cause an exception to be thrown
* @param resultRequested A set list of enum types from the Result Type enum class
* @throws IOException If an IO exception is thrown
* @throws ParseException If a parse exception is thrown
*/
public static void createAccessibilityHtmlReport(SeleniumTestObject testObject, Results result,
boolean throwOnViolation, Set<ResultType> resultRequested) throws IOException, ParseException {
createAccessibilityHtmlReport(testObject, () -> result, throwOnViolation, resultRequested);
Expand All @@ -211,6 +236,8 @@ public static void createAccessibilityHtmlReport(SeleniumTestObject testObject,
* @param testObject The TestObject to associate the report with
* @param getResults Function for getting the accessibility scan results
* @param throwOnViolation Should violations cause an exception to be thrown
* @throws IOException If an IO exception is thrown
* @throws ParseException If a parse exception is thrown
*/
public static void createAccessibilityHtmlReport(SeleniumTestObject testObject,
Supplier<Results> getResults, boolean throwOnViolation,
Expand Down Expand Up @@ -243,7 +270,7 @@ public static void createAccessibilityHtmlReport(SeleniumTestObject testObject,
testObject.getLogger().logMessage(MessageType.INFORMATION,
"Ran accessibility check and created HTML report: " + report + " ");

// Throw exception if we found violations when we want that to cause an error
// Throw exception if we found any violations, we want that to cause an error
if (throwOnViolation && !getResults.get().getViolations().isEmpty()) {
throw new AxeRuntimeException(new Exception(System.lineSeparator()
+ "Accessibility violations, see: " + report + " for more details."));
Expand Down
Loading

0 comments on commit b6a8e48

Please sign in to comment.