Package org.xwiki.test.ui
Class WCAGUtils
- java.lang.Object
-
- org.xwiki.test.ui.WCAGUtils
-
public class WCAGUtils extends Object
Helper methods for validating WCAG, not related to a specific Page Object. Also made available to tests classes.- Since:
- 15.2RC1
- Version:
- $Id: 918b0c69210eb16cdb98bf72f344892dfd76e976 $
-
-
Constructor Summary
Constructors Constructor Description WCAGUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertWCAGResults()
Assert that the results of the different WCAG failing checks are all empty.void
changeWCAGTestMethod(String testMethodName)
Change the current WCAG test method for reporting.void
endWCAGValidation()
Ends the validation process for WCAG.WCAGContext
getWCAGContext()
Get the WCAG context for the test suite.void
setupWCAGValidation(boolean wcag, String testClassName, boolean stopOnError)
void
writeWCAGResults()
Writes the WCAG validation results into report files.
-
-
-
Method Detail
-
setupWCAGValidation
public void setupWCAGValidation(boolean wcag, String testClassName, boolean stopOnError)
- Parameters:
wcag
- true if WCAG tests must be executed, false otherwisetestClassName
- the PO class name to use for logging and reportingstopOnError
-false
if WCAG validation should ignore errors,true
otherwise.
-
changeWCAGTestMethod
public void changeWCAGTestMethod(String testMethodName)
Change the current WCAG test method for reporting.- Parameters:
testMethodName
- the test method name to update
-
getWCAGContext
public WCAGContext getWCAGContext()
Get the WCAG context for the test suite.- Returns:
- the WCAG Context
-
endWCAGValidation
public void endWCAGValidation() throws IOException
Ends the validation process for WCAG.- Throws:
IOException
-
writeWCAGResults
public void writeWCAGResults() throws IOException
Writes the WCAG validation results into report files. There are four files: * wcagOverview : overview of the results, contains stats and will always be generated. * wcagIncomplete : list of the results that are Incomplete and need further manual inspection. * wcagWarnings : list of the results that are violations, not failing the build. * wcagFails : list of the results that are violations, failing the build.- Throws:
IOException
- if the directory creation fails
-
assertWCAGResults
public void assertWCAGResults()
Assert that the results of the different WCAG failing checks are all empty.
-
-