Ticket #4215 (closed enhancement: fixed)

Opened 11 months ago

Last modified 11 months ago

Dijit-tests: proposed test suite patch

Reported by: dante Owned by: dante
Priority: normal Milestone: 1.0
Component: Dijit Version: 0.9
Severity: normal Keywords:
Cc: dante, peller, liucougar, sfoster

Description

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

test_TitlePane.html (3.8 kB) - added by dante 11 months ago.
example test page against svn head as of today
_testCommon.js (2.8 kB) - added by dante 11 months ago.

Change History

Changed 11 months ago by dante

example test page against svn head as of today

Changed 11 months 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

  foo.html?lang=ja-JP&dir=rtl&theme=soria&a11y=true

Changed 11 months ago by dante

  • status changed from new to assigned

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 11 months ago by dante

Changed 11 months ago by peller

+1 from me.

Changed 11 months 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).

Changed 11 months ago by dante

  • status changed from assigned to closed
  • resolution set to fixed

(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 ...

Changed 11 months ago by dante

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

Note: See TracTickets for help on using tickets.