testaro 5.9.0 → 5.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "5.9.0",
3
+ "version": "5.9.1",
4
4
  "description": "Automation of accessibility testing",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/run.js CHANGED
@@ -56,6 +56,7 @@ const tests = {
56
56
  styleDiff: 'style inconsistencies',
57
57
  tabNav: 'keyboard navigation between tab elements',
58
58
  tenon: 'Tenon',
59
+ title: 'page title',
59
60
  titledEl: 'title attributes on inappropriate elements',
60
61
  wave: 'WAVE',
61
62
  zIndex: 'z indexes'
package/tests/elements.js CHANGED
@@ -46,8 +46,10 @@ exports.reporter = async (page, detailLevel, tagName, onlyVisible, attribute) =>
46
46
  // For each specified element:
47
47
  elements.forEach(element => {
48
48
  // Initialize data on it.
49
+ const parent = element.parentElement;
49
50
  const datum = {
50
51
  tagName: element.tagName,
52
+ parentTagName: parent ? parent.tagName : '',
51
53
  code: compact(element.outerHTML),
52
54
  attributes: [],
53
55
  textContent: compact(element.textContent)
package/tests/title.js ADDED
@@ -0,0 +1,8 @@
1
+ /*
2
+ title
3
+ This test reports the page title.
4
+ */
5
+ exports.reporter = async page => {
6
+ const title = await page.title();
7
+ return {result: title};
8
+ };