Skip to content

Commit

Permalink
Merge branch 'main' into feat-vol-5327-b
Browse files Browse the repository at this point in the history
  • Loading branch information
sdh100shaun authored May 18, 2024
2 parents d46d8b0 + 87e677f commit f7f310e
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 29 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ jobs:

name: Publish to GitHub Packages Apache Maven
uses: ./.github/workflows/maven.yaml
secrets: inherit
with:
maven-goal: deploy

needs: release-please


4 changes: 2 additions & 2 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v4
- uses: whelk-io/maven-settings-xml-action@v22
with:
servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]'
servers: '[{ "id":"dvsa-github-packages", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]'

- run: mvn -B -P github ${{ inputs.maven-goal}}


4 changes: 2 additions & 2 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
cache: maven
- uses: whelk-io/maven-settings-xml-action@v22
with:
servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]'
servers: '[{ "id":"dvsa-github-packages", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]'

- run: snyk test --severity-threshold=${{ inputs.severity-threshold || 'high' }} -- -P github
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Changelog

## [1.0.1](https://github.com/dvsa/vol-accessibility-lib/compare/v1.0.0...v1.0.1) (2024-05-17)


### Bug Fixes

* env ([0d09507](https://github.com/dvsa/vol-accessibility-lib/commit/0d0950718a2015094e80d1e6923a0fc10264c7e9))
* Update cd.yaml ([9a4f79f](https://github.com/dvsa/vol-accessibility-lib/commit/9a4f79ffbc9cc2f315a2c8c2cbc1334827157b13))
* Update cd.yaml ([cae6e1f](https://github.com/dvsa/vol-accessibility-lib/commit/cae6e1f8d50fac9e6af3ecc6cb898fc5fdf9ab1d))

## 1.0.0 (2024-05-17)


### Features

* axe core ([b4c300e](https://github.com/dvsa/vol-accessibility-lib/commit/b4c300ea36a522ef6d90fbc2332c063d62020b1c))
* compiler ([c44e6ee](https://github.com/dvsa/vol-accessibility-lib/commit/c44e6ee668ddaad23bf02b7f37665bf540e99beb))
* github packages ([411c290](https://github.com/dvsa/vol-accessibility-lib/commit/411c290ea233798573c4d27c3b07c72671bf72fb))
* pom changes ([442af2c](https://github.com/dvsa/vol-accessibility-lib/commit/442af2c7693dacea1c78f50c4b4b4687bce17ffc))
* snyk ([f697056](https://github.com/dvsa/vol-accessibility-lib/commit/f697056a07f18f78c8d2b4a1a0568d19abf432b9))
* snyk ([ecbe0b8](https://github.com/dvsa/vol-accessibility-lib/commit/ecbe0b87e823375d973723a544bdf17ba26f21e6))
* snyk ([fb2a0b1](https://github.com/dvsa/vol-accessibility-lib/commit/fb2a0b1adf603c3c927abb94ffb9c5ad167b767c))
* snyk ignore ([1d4160a](https://github.com/dvsa/vol-accessibility-lib/commit/1d4160afb14470705eda69affb6637588b2de2ec))


### Bug Fixes

* revert scanner changes ([b5d01dc](https://github.com/dvsa/vol-accessibility-lib/commit/b5d01dc38b3bb4142e87c5f7b59bfcf10e123bf7))
* Update cd.yaml ([de52a71](https://github.com/dvsa/vol-accessibility-lib/commit/de52a71d34734d013c01a28ed1d6523609a55671))
* Update cd.yaml ([7929040](https://github.com/dvsa/vol-accessibility-lib/commit/79290401fb789291ae4c34aa9b7ca235e2fb1047))
* version ([9f19a59](https://github.com/dvsa/vol-accessibility-lib/commit/9f19a59444254398f03e3cc348bfbf5a934946d2))
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Description
# Description.

Accessibility scanner library. This is a wrapper for the selenium axe framework.
Once the scan has completed and any issues found, there will be a REPORT folder created in the project
Expand All @@ -10,4 +10,15 @@ that consumes this library.
# Rules

This library uses AXE-CORE to scan for accessibility violations. The full rules that the scan covers
can be found on the following link https://dequeuniversity.com/rules/axe/3.2
can be found on the following link https://dequeuniversity.com/rules/axe/3.2

## Installation
Add the following Maven dependency to your project's `pom.xml` file:
```xml
<dependency>
<groupId>org.dvsa.testing.framework</groupId>
<artifactId>accessibility-library</artifactId>
<version>[insert latest version of package]</version>
</dependency>
```

28 changes: 9 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.dvsa.testing.lib</groupId>
<artifactId>accessibility-library</artifactId>
<version>2.9</version>
<version>1.0.2-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -47,30 +45,22 @@
</plugins>
</build>

<profiles>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>github-vol-active-support</id>
<id>dvsa-github-packages</id>
<name>GitHub dvsa Apache Maven Packages</name>
<url>https://maven.pkg.github.com/dvsa/vol-active-support</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
<url>https://maven.pkg.github.com/dvsa/*</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
</repositories>
</profile>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/scanner/AXEScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import activesupport.driver.Browser;
import com.deque.html.axecore.args.AxeRuleOptions;
import com.deque.html.axecore.args.AxeRunOptions;
import com.deque.html.axecore.args.AxeRunOptions;
import com.deque.html.axecore.results.Results;
import com.deque.html.axecore.results.Rule;
import com.deque.html.axecore.selenium.AxeBuilder;
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/scanner/ReportGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@ private static String readLinesAsInputStream(InputStream inputStream) throws IOE
private static String readLines(String filePath) {
StringBuilder contentBuilder = new StringBuilder();
try (Stream<String> stream = Files.lines(Paths.get(filePath), StandardCharsets.UTF_8)) {
final StringBuilder finalContentBuilder = contentBuilder;
stream.forEach(s -> finalContentBuilder.append(s).append("\n"));
stream.forEach(s -> contentBuilder.append(s).append("\n"));
} catch (IOException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit f7f310e

Please sign in to comment.