Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#4215 closed enhancement (fixed)

Dijit-tests: proposed test suite patch

Reported by: dante Owned by: dante
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Keywords: Cc: dante, Adam Peller, liucougar, Sam Foster
Blocked By: Blocking:


this is a proposed test-suite file to create links in the dijit test_* files to allow for easy switching between themes, right-to-left, and a11y (and combo's of each). degrades to tundra/normal if no query string. this implementation requires the inclusion of the file, and some style additions to dijit/tests/css/dijitTests.css.

tested in ie6, safari/win32, ff2/win32 so far. popup is bound to ctrl-f9 for the time being.

it deprecates testBidi.js. to implement, simply replace the testBidi.js call in a test page with _testCommon.js, and move to a line following dojo.js script tag.

uses document.write to add stylesheet links (fixes ie7 issue with appending to unclosed head) and uses dojo.moduleUrl to determine path to theme files.

Attachments (2)

test_TitlePane.html (3.8 KB) - added by dante 14 years ago.
example test page against svn head as of today
_testCommon.js (2.8 KB) - added by dante 14 years ago.

Download all attachments as: .zip

Change History (8)

Changed 14 years ago by dante

Attachment: test_TitlePane.html added

example test page against svn head as of today

comment:1 Changed 14 years ago by bill

Owner: changed from bill to dante

Sure, looks fine to me. You might want to combine w/the locale flag processing I put in i18n.html, and also maybe have a standard interface like


comment:2 Changed 14 years ago by dante

Status: newassigned

new patch attached allows for common api mentioned above, can test theme + a11y + rtl + locale (or any combination of those) ... this would be another 'monster commit', touching every .html file in dijit/tests (svn del testBidi.js + move bidi line below dojo.js to read _testCommon.js) so just say and i'll start patching.

Changed 14 years ago by dante

Attachment: _testCommon.js added

comment:3 Changed 14 years ago by Adam Peller

+1 from me.

comment:4 Changed 14 years ago by bill

Sure, looks good to me. And you can just remove testBidi.js once you've removed the references to it (don't forget to check the demo dir and also dojox).

comment:5 Changed 14 years ago by dante

Resolution: fixed
Status: assignedclosed

(In [10360]) pseudo monster commit fixes #4215 - removes testBidi.js from all dijit test files, and incorporates a lightweight testCommon module for ease in visual testing. all test cases should include _testCommon.js in a script tag immediately following dojo.js to enable theme switching, and test switching (rtl + a11y + rtl/a11y so far) ... now, on any dijit test page, press ctrl-f9 to popup a small dialog in the t/r corner of screen with links to set the various modes. testCommon does some funky-ness, most notablally: turns off parseOnLoad and defers parsing until an addOnLoad (after css is set on body) so layout widgets render properly, and uses unofficial djConfig var defaultTestTheme, in the event you want to showcase a particular theme as the default (other than tundra), like in the case of /dijit/demos/mail.html ...

comment:6 Changed 14 years ago by dante

(In [10370]) refs #4215 - ie6 wasn't listening to window,"onkeypress"

Note: See TracTickets for help on using tickets.