Skip to content

Commit e61a3bd

Browse files
authored
Bug fixes, Version Updates
Bug fixes, Version Updates
2 parents 5718ce0 + e3bbe48 commit e61a3bd

File tree

24 files changed

+296
-516
lines changed

24 files changed

+296
-516
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,27 @@ on:
44
branches:
55
- master
66
pull_request:
7-
types: [opened, synchronize, reopened]
7+
types: [ opened, synchronize, reopened ]
88
jobs:
99
build:
1010
name: Build
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
14-
with:
15-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
1614
- name: Set up JDK 11
1715
uses: actions/setup-java@v1
1816
with:
1917
java-version: 11
20-
- name: Cache SonarCloud packages
21-
uses: actions/cache@v1
22-
with:
23-
path: ~/.sonar/cache
24-
key: ${{ runner.os }}-sonar
25-
restore-keys: ${{ runner.os }}-sonar
2618
- name: Cache Maven packages
2719
uses: actions/cache@v1
2820
with:
2921
path: ~/.m2
3022
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3123
restore-keys: ${{ runner.os }}-m2
32-
- name: Build and analyze
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
35-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
36-
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=sridharbandi_Java-a11y
24+
- name: Unit tests
25+
run: mvn clean test
26+
- name: Codacy Coverage
27+
uses: codacy/codacy-coverage-reporter-action@v1
28+
with:
29+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
30+
coverage-reports: target/jacoco.xml

ReadMe.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
[![Maven Central](https://img.shields.io/maven-central/v/io.github.sridharbandi/java-a11y.svg)](http://search.maven.org/#search|ga|1|g:"io.github.sridharbandi")
1313
[![jdk badge](https://img.shields.io/badge/jdk-8-green.svg)](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
14+
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/8b32dbe54c8d4b5e902390926e8b0d46)](https://www.codacy.com/gh/sridharbandi/Java-a11y/dashboard?utm_source=github.com&utm_medium=referral&utm_content=sridharbandi/Java-a11y&utm_campaign=Badge_Grade)
15+
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/8b32dbe54c8d4b5e902390926e8b0d46)](https://www.codacy.com/gh/sridharbandi/Java-a11y/dashboard?utm_source=github.com&utm_medium=referral&utm_content=sridharbandi/Java-a11y&utm_campaign=Badge_Coverage)
1416
[![License badge](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
1517
[![Contributer badge](https://img.shields.io/github/contributors/sridharbandi/Java-a11y.svg)](https://github.com/sridharbandi/Java-a11y/graphs/contributors)
1618

@@ -27,12 +29,12 @@ For maven based project add the below dependency
2729
<dependency>
2830
<groupId>io.github.sridharbandi</groupId>
2931
<artifactId>java-a11y</artifactId>
30-
<version>3.0.0</version>
32+
<version>3.0.1</version>
3133
</dependency>
3234
```
3335
For gradle based project add the below dependency
3436
```
35-
compile 'io.github.sridharbandi:java-a11y:3.0.0'
37+
compile 'io.github.sridharbandi:java-a11y:3.0.1'
3638
```
3739
For non gradle/maven project download the jar from below mentioned link and add it to CLASSPATH for your project
3840

pom.xml

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>io.github.sridharbandi</groupId>
77
<artifactId>java-a11y</artifactId>
8-
<version>3.0.0</version>
8+
<version>3.0.1</version>
99

1010
<name>Java a11y</name>
1111
<description>Accessibility Automation for Web Apps with Java and Selenium Webdriver</description>
@@ -36,17 +36,16 @@
3636
<properties>
3737
<maven.compiler.source>8</maven.compiler.source>
3838
<maven.compiler.target>8</maven.compiler.target>
39-
<freemaker.version>2.3.30</freemaker.version>
40-
<slf4j.version>2.0.0-alpha1</slf4j.version>
41-
<junit.version>5.7.0</junit.version>
42-
<mockito.verion>3.7.0</mockito.verion>
43-
<selenium.version>4.0.0-rc-2</selenium.version>
44-
<jackson.version>2.12.1</jackson.version>
39+
<freemaker.version>2.3.31</freemaker.version>
40+
<slf4j.version>2.0.3</slf4j.version>
41+
<junit.version>5.9.1</junit.version>
42+
<mockito.verion>4.8.1</mockito.verion>
43+
<selenium.version>4.5.3</selenium.version>
44+
<jackson.version>2.14.0-rc3</jackson.version>
4545
<commonsio.version>2.11.0</commonsio.version>
46+
<annotation.version>1.3.2</annotation.version>
4647
<surefire.version>3.0.0-M5</surefire.version>
47-
48-
<sonar.organization>sridharbandi</sonar.organization>
49-
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
48+
<jacoco.version>0.8.8</jacoco.version>
5049
</properties>
5150

5251
<dependencies>
@@ -67,14 +66,19 @@
6766
</dependency>
6867
<dependency>
6968
<groupId>org.slf4j</groupId>
70-
<artifactId>slf4j-log4j12</artifactId>
69+
<artifactId>slf4j-reload4j</artifactId>
7170
<version>${slf4j.version}</version>
7271
</dependency>
7372
<dependency>
7473
<groupId>commons-io</groupId>
7574
<artifactId>commons-io</artifactId>
7675
<version>${commonsio.version}</version>
7776
</dependency>
77+
<dependency>
78+
<groupId>javax.annotation</groupId>
79+
<artifactId>javax.annotation-api</artifactId>
80+
<version>${annotation.version}</version>
81+
</dependency>
7882
<dependency>
7983
<groupId>org.junit.jupiter</groupId>
8084
<artifactId>junit-jupiter-engine</artifactId>
@@ -95,6 +99,34 @@
9599
<artifactId>maven-surefire-plugin</artifactId>
96100
<version>${surefire.version}</version>
97101
</plugin>
102+
<plugin>
103+
<groupId>org.jacoco</groupId>
104+
<artifactId>jacoco-maven-plugin</artifactId>
105+
<version>${jacoco.version}</version>
106+
<configuration>
107+
<excludes>
108+
<exclude>io/github/sridharbandi/modal/**/*</exclude>
109+
</excludes>
110+
<formats>
111+
<format>XML</format>
112+
</formats>
113+
<outputDirectory>${project.build.directory}</outputDirectory>
114+
</configuration>
115+
<executions>
116+
<execution>
117+
<goals>
118+
<goal>prepare-agent</goal>
119+
</goals>
120+
</execution>
121+
<execution>
122+
<id>report</id>
123+
<phase>test</phase>
124+
<goals>
125+
<goal>report</goal>
126+
</goals>
127+
</execution>
128+
</executions>
129+
</plugin>
98130
</plugins>
99131
</build>
100132
</project>

src/main/java/io/github/sridharbandi/AxeRunner.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
public class AxeRunner implements IRunner {
1313

1414
private A11y a11y;
15-
private WebDriver driver;
1615

1716
public AxeRunner(WebDriver driver) {
18-
this.driver = driver;
1917
a11y = new A11y(driver);
2018
}
2119

src/main/java/io/github/sridharbandi/HtmlCsRunner.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import io.github.sridharbandi.a11y.Engine;
55
import io.github.sridharbandi.a11y.HTMLCS;
66
import io.github.sridharbandi.modal.htmlcs.Issues;
7+
import io.github.sridharbandi.modal.htmlcs.Params;
78
import io.github.sridharbandi.util.A11y;
89
import org.openqa.selenium.WebDriver;
910

@@ -15,24 +16,31 @@ public class HtmlCsRunner implements IRunner {
1516

1617
private A11y a11y;
1718
private HTMLCS standard;
18-
private WebDriver driver;
19+
private Params params;
20+
private String[] codes = {};
1921

2022
public HtmlCsRunner(WebDriver driver) {
21-
this.driver = driver;
2223
a11y = new A11y(driver);
24+
params = new Params();
2325
}
2426

2527
public void setStandard(HTMLCS standard) {
2628
this.standard = standard;
2729
}
2830

31+
public void setIgnoreCodes(String[] codes){
32+
this.codes = codes;
33+
}
34+
35+
2936
@Override
3037
public void execute() throws IOException, URISyntaxException, TemplateException {
3138
String stdrd = Objects.isNull(standard) ? HTMLCS.WCAG2AA.name() : standard.name();
32-
a11y.execute(Engine.HTMLCS, stdrd);
39+
params.setStandard(stdrd);
40+
params.setIgnoreCodes(codes);
41+
a11y.execute(Engine.HTMLCS, params);
3342
}
3443

35-
3644
public void generateHtmlReport() throws IOException {
3745
IRunner.super.generateHtmlReport(a11y, Engine.HTMLCS, Issues.class);
3846
}

src/main/java/io/github/sridharbandi/ftl/FtlConfig.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@
88
import java.io.IOException;
99
import java.util.Optional;
1010

11-
import static io.github.sridharbandi.util.Statik.ENCODING;
12-
import static io.github.sridharbandi.util.Statik.TEMPLATE_DIR;
1311

1412
public class FtlConfig {
1513

14+
public static final String TEMPLATE_DIR = "ftl";
15+
public static final String ENCODING = "UTF-8";
16+
1617
private static FtlConfig instance;
1718

1819
private Configuration cfg;
1920

2021
public FtlConfig() {
21-
cfg = new Configuration(Configuration.VERSION_2_3_30);
22+
cfg = new Configuration(Configuration.VERSION_2_3_31);
2223
cfg.setClassLoaderForTemplateLoading(this.getClass().getClassLoader(), TEMPLATE_DIR);
2324
cfg.setDefaultEncoding(ENCODING);
2425
cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);

src/main/java/io/github/sridharbandi/modal/axe/Any.java

Lines changed: 0 additions & 95 deletions
This file was deleted.

src/main/java/io/github/sridharbandi/modal/axe/All.java renamed to src/main/java/io/github/sridharbandi/modal/axe/Checks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"relatedNodes"
1818
})
1919
@Generated("jsonschema2pojo")
20-
public class All {
20+
public class Checks {
2121

2222
@JsonProperty("data")
2323
private Object data;

0 commit comments

Comments
 (0)