Skip to content

Commit

Permalink
Merge pull request #235 from matatk/revert-234-develop-json-to-html
Browse files Browse the repository at this point in the history
Revert "JSON-to-HTML and HTML-to-JSON"
  • Loading branch information
matatk authored Dec 28, 2018
2 parents a103b70 + dcd6b7d commit 512b94f
Show file tree
Hide file tree
Showing 117 changed files with 581 additions and 835 deletions.
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@
"profile-guarding": "node scripts/profile-guarding.js",
"start:firefox": "web-ext run --browser-console --source-dir build/firefox/",
"pretest": "eslint .",
"test": "npm run test:landmarks && npm run test:contrast && npm run test:json-to-html && npm run test:html-to-json",
"test": "npm run test:landmarks && npm run test:contrast",
"pretest:contrast": "rollup src/code/contrastChecker.js -f cjs > test/test-code-in-harness-contrast.js",
"test:contrast": "node test/test-contrast.js",
"test:html-to-json": "node test/test-html-to-json.js",
"pretest:json-to-html": "rollup src/code/jsonToHtml.js -f cjs > test/test-code-in-harness-json-to-html.js",
"test:json-to-html": "node test/test-json-to-html.js",
"pretest:landmarks": "rollup src/code/landmarksFinder.js -f cjs > test/test-code-in-harness-landmarks.js",
"test:landmarks": "node test/test-landmarks.js"
},
Expand Down
67 changes: 0 additions & 67 deletions scripts/html-to-json.js

This file was deleted.

24 changes: 0 additions & 24 deletions src/code/jsonToHtml.js

This file was deleted.

3 changes: 3 additions & 0 deletions test/data/application-alone-on-body-is-ignored.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"expected": []
}
34 changes: 34 additions & 0 deletions test/data/aria-labelledby-multiple-idrefs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"expected": [
{
"depth": 0,
"role": "banner",
"label": null,
"selector": "body > header"
},
{
"depth": 1,
"role": "navigation",
"label": "World of wombats",
"selector": "body > header > nav"
},
{
"depth": 0,
"role": "main",
"label": "Looking after your wombat",
"selector": "body > main"
},
{
"depth": 1,
"role": "navigation",
"label": "Looking after your wombat Topics",
"selector": "body > main > nav:nth-child(2)"
},
{
"depth": 0,
"role": "contentinfo",
"label": null,
"selector": "body > footer"
}
]
}
3 changes: 3 additions & 0 deletions test/data/article-is-ignored.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"expected": []
}
10 changes: 10 additions & 0 deletions test/data/aside-alone-is-recognised.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"expected": [
{
"depth": 0,
"role": "complementary",
"label": null,
"selector": "body > aside"
}
]
}
10 changes: 10 additions & 0 deletions test/data/aside-aria-labelledby.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"expected": [
{
"depth": 0,
"role": "complementary",
"label": "And another thing...",
"selector": "body > aside"
}
]
}
148 changes: 148 additions & 0 deletions test/data/digital-publishing-roles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"expected": [
{
"depth": 0,
"role": "doc-part",
"label": "Frontmatter",
"selector": "body > div:nth-child(3)"
},
{
"depth": 1,
"role": "doc-toc",
"label": null,
"selector": "body > div:nth-child(3) > nav:nth-child(1)"
},
{
"depth": 1,
"role": "doc-pagelist",
"label": null,
"selector": "body > div:nth-child(3) > nav:nth-child(2)"
},
{
"depth": 1,
"role": "doc-preface",
"label": null,
"selector": "body > div:nth-child(3) > div:nth-child(3)"
},
{
"depth": 1,
"role": "doc-foreword",
"label": null,
"selector": "body > div:nth-child(3) > div:nth-child(4)"
},
{
"depth": 1,
"role": "doc-acknowledgements",
"label": null,
"selector": "body > div:nth-child(3) > div:nth-child(5)"
},
{
"depth": 1,
"role": "doc-prologue",
"label": null,
"selector": "body > div:nth-child(3) > div:nth-child(6)"
},
{
"depth": 1,
"role": "doc-introduction",
"label": null,
"selector": "body > div:nth-child(3) > div:nth-child(7)"
},
{
"depth": 0,
"role": "doc-part",
"label": "Mainmatter",
"selector": "body > div:nth-child(4)"
},
{
"depth": 1,
"role": "doc-chapter",
"label": "Beginnings",
"selector": "body > div:nth-child(4) > section:nth-child(1)"
},
{
"depth": 1,
"role": "doc-chapter",
"label": "Middles",
"selector": "body > div:nth-child(4) > section:nth-child(2)"
},
{
"depth": 1,
"role": "doc-chapter",
"label": "Endings",
"selector": "body > div:nth-child(4) > section:nth-child(3)"
},
{
"depth": 1,
"role": "doc-conclusion",
"label": null,
"selector": "body > div:nth-child(4) > section:nth-child(4)"
},
{
"depth": 0,
"role": "doc-part",
"label": "Backmatter",
"selector": "body > div:nth-child(5)"
},
{
"depth": 1,
"role": "doc-epilogue",
"label": null,
"selector": "body > div:nth-child(5) > div:nth-child(1)"
},
{
"depth": 1,
"role": "doc-afterword",
"label": null,
"selector": "body > div:nth-child(5) > div:nth-child(2)"
},
{
"depth": 1,
"role": "doc-endnotes",
"label": null,
"selector": "body > div:nth-child(5) > div:nth-child(3)"
},
{
"depth": 1,
"role": "doc-bibliography",
"label": "References",
"selector": "body > div:nth-child(5) > div:nth-child(4)"
},
{
"depth": 1,
"role": "doc-glossary",
"label": null,
"selector": "body > div:nth-child(5) > dl:nth-child(5)"
},
{
"depth": 1,
"role": "doc-index",
"label": null,
"selector": "body > div:nth-child(5) > nav:nth-child(6)"
},
{
"depth": 1,
"role": "doc-credits",
"label": null,
"selector": "body > div:nth-child(5) > div:nth-child(7)"
},
{
"depth": 1,
"role": "doc-errata",
"label": null,
"selector": "body > div:nth-child(5) > div:nth-child(8)"
},
{
"depth": 1,
"role": "doc-appendix",
"label": "Technical specification",
"selector": "body > div:nth-child(5) > div:nth-child(9)"
},
{
"depth": 1,
"role": "doc-appendix",
"label": "Detailed schematics",
"selector": "body > div:nth-child(5) > div:nth-child(10)"
}
]
}
3 changes: 3 additions & 0 deletions test/data/footer-in-blockquote-is-ignored.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"expected": []
}
3 changes: 3 additions & 0 deletions test/data/form-alone-is-ignored.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"expected": []
}
10 changes: 10 additions & 0 deletions test/data/form-aria-label.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"expected": [
{
"depth": 0,
"role": "form",
"label": "Contact Us",
"selector": "body > form"
}
]
}
10 changes: 10 additions & 0 deletions test/data/form-aria-labelledby.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"expected": [
{
"depth": 0,
"role": "form",
"label": "Report a Fault",
"selector": "body > form"
}
]
}
40 changes: 40 additions & 0 deletions test/data/header-containing-nav-nav-search.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"expected": [
{
"depth": 0,
"role": "banner",
"label": null,
"selector": "body > header"
},
{
"depth": 1,
"role": "navigation",
"label": null,
"selector": "body > header > nav:nth-child(1)"
},
{
"depth": 1,
"role": "navigation",
"label": null,
"selector": "body > header > nav:nth-child(2)"
},
{
"depth": 2,
"role": "search",
"label": null,
"selector": "body > header > nav:nth-child(2) > div"
},
{
"depth": 0,
"role": "main",
"label": null,
"selector": "body > main"
},
{
"depth": 0,
"role": "contentinfo",
"label": null,
"selector": "body > footer"
}
]
}
3 changes: 3 additions & 0 deletions test/data/header-in-blockquote-is-ignored.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"expected": []
}
Loading

0 comments on commit 512b94f

Please sign in to comment.