aboutsummaryrefslogtreecommitdiff
path: root/exampleData
diff options
context:
space:
mode:
authorGravatar Benjamin Jones <bjones@galois.com>2013-01-02 13:14:18 -0800
committerGravatar Benjamin Jones <bjones@galois.com>2013-01-02 13:14:18 -0800
commit56fabf776a9f64807e675204e03b1795015cdca5 (patch)
tree35ae8c6f15ed2a25c0423daf0dc3d3a392027a64 /exampleData
parentc66cf7ad61a065c19927c66d1d509c66915ffd83 (diff)
added work in progress on trac guidelines
Diffstat (limited to 'exampleData')
-rw-r--r--exampleData/ruleSets/trac/navigation.json57
-rw-r--r--exampleData/ruleSets/trac/structure.json29
2 files changed, 86 insertions, 0 deletions
diff --git a/exampleData/ruleSets/trac/navigation.json b/exampleData/ruleSets/trac/navigation.json
new file mode 100644
index 0000000..bda8dab
--- /dev/null
+++ b/exampleData/ruleSets/trac/navigation.json
@@ -0,0 +1,57 @@
+/*
+ * navigation.json
+ * Author: Benjamin Jones <bjones@galois.com>
+ *
+ * Ruleset for checking the consistency of Trac navigation elements
+ */
+
+{ 'name': "Trac Navigation Guidelines"
+, 'description': "Guidelines for checking the consistency of Trac navigation elements"
+, 'rules': [
+//--------------------------------------------
+ { 'name': "Homepage link"
+ , 'description': "all pages should link back to the homepage"
+ , 'rule':
+ function() {
+ if ($5("a").linksTo("http://wiki.galois.com").length === 0) {
+ var elt = $("body");
+ report("did not find a link back to homepage", elt);
+ }
+ }
+ },
+//--------------------------------------------
+ { 'name': "Global navigation"
+ , 'description': "Global navigation links should appear on every page"
+ , 'rule':
+ function() {
+ if (! $5("div").idExists("topbar")) {
+ var elt = $("body");
+ report("could not find global navigation links", elt);
+ }
+ }
+ },
+//--------------------------------------------
+ { 'name': "Module level navigation"
+ , 'description': "Module level navigation links should appear on every page"
+ , 'rule':
+ function() {
+ if (! $5("div").idExists("mainnav")) {
+ var elt = $("body");
+ report("could not find module navigation links", elt);
+ }
+ }
+ },
+//--------------------------------------------
+ { 'name': "Local navigation"
+ , 'description': "Local (context dependent) navigation links should appear on every page"
+ , 'rule':
+ function() {
+ if (! $5("div").idExists("ctxtnav")) {
+ var elt = $("body");
+ report("could not find local (context dependent) navigation links", elt);
+ }
+ }
+ }//,
+//--------------------------------------------
+ ]
+}
diff --git a/exampleData/ruleSets/trac/structure.json b/exampleData/ruleSets/trac/structure.json
new file mode 100644
index 0000000..1207241
--- /dev/null
+++ b/exampleData/ruleSets/trac/structure.json
@@ -0,0 +1,29 @@
+/*
+ * structure.json
+ * Author: Benjamin Jones <bjones@galois.com>
+ *
+ * Guidelines relating to structure (headings, layout, ...) of pages
+ */
+
+{ 'name': "Structure Guidelines"
+, 'description': "Guidelines relating to structure (headings, layout, ...) of pages"
+, 'rules': [
+//--------------------------------------------
+ { 'name': "Headings exist"
+ , 'description': "every page should include at least one heading"
+ , 'rule':
+ function() {
+ if (! $5(":heading").nonEmpty().exists()) {
+ var elt = $5("body");
+ report("could not find any (non-empty) headings on the page", elt);
+ }
+ },
+//--------------------------------------------
+ { 'name': "Fluid Layouts"
+ , 'description': "pages should not use a fluid layout"
+ , 'rule':
+ function() {
+ }//,
+//--------------------------------------------
+ ]
+}