/* * navigation.json * Author: Benjamin Jones * * 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) { report("did not find a link back to homepage", $("body")); } } }, //-------------------------------------------- { 'name': "Global navigation" , 'description': "Global navigation links should appear on every page" , 'rule': function() { if (! $5("div#topbar")) { report("could not find global navigation links", $("body")); } } }, //-------------------------------------------- { 'name': "Module level navigation" , 'description': "Module level navigation links should appear on every page" , 'rule': function() { if ( $5("div#mainnav").length === 0 ) { report("could not find module navigation links", $("body")); } } }, //-------------------------------------------- { 'name': "Local navigation" , 'description': "Local (context dependent) navigation links should appear on every page" , 'rule': function() { if (! $5("div#ctxtnav")) { report("could not find local (context dependent) navigation links", $("body")); } } } //-------------------------------------------- ] }