Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15380 closed enhancement (invalid)

[CLA] [PATCH] only HTML file for UI test under DOH with testUiUrl

Reported by: Sasha Firsov Owned by:
Priority: undecided Milestone: tbd
Component: TestFramework Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

For single test dijit author needs to create and tune 4 files . 2 HTMLs and 2 JS.

proposed

add extra parameter testUiUrl for runner.html. It will load HTML in test IFRAME without need for specific module.js.

demo sample attached

Meant as working showcase. But right solution would be integration into util\doh\_parseURLargs.js I am ready to provide patch upon design acceptance.

Attached sample gives runner.html testUiUrl parameter to load HTML file with embedded test without the need for JS and forward HTML. Given sample is handy for low-logic dijits tests to reduce number of test files and their complexity.

Replaced functionality

runTest.html::

instead of redirect embedded link used

run in DOH

module.js::

replaced by generic reusable module testModule=lib.doh.UiRunner?

test.js::

replaced by embedded into html test cases

Kept same

test.js::

replaced by embedded into html test cases

Added functionality

Link to "standalone"(without doh wrapper) added to switch between DOH IFRAME-d and plain test HTML page.

run standalone}}} NOT related to http://trac.dojotoolkit.org/ticket/5149

Attachments (1)

code.zip (2.6 KB) - added by Sasha Firsov 7 years ago.
demo code

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by Sasha Firsov

Attachment: code.zip added

demo code

comment:1 Changed 7 years ago by Sasha Firsov

Mistakenly used wiki preprocessor. The links should be: <a href="../../../libcommon/DTK1.7/util/doh/runner.html?testModule=lib.doh.UiRunner?&testUiUrl=lib/doh/test/test.html&paths=lib,../../../lib"

target="_top"

run in DOH</a>

<a href="../../../lib/doh/test/test.html"

target="_top"

run standalone</a>

comment:2 Changed 7 years ago by bill

Resolution: invalid
Status: newclosed

For single test dijit author needs to create and tune 4 files . 2 HTMLs and 2 JS.

That's not true at all. As Ben told you please post questions to the dojo-interest mailing list.

comment:3 Changed 7 years ago by Sasha Firsov

Bill Keese proposed:

A better approach from my point of view would be 
a loader plugin to simplify writing module.js files 
that run (multiple) HTML test files, so that you could do something like:

define( [
   "doh/html!dijit/tests/robot/Dialog_a11y.html"
   ...
] );

Note: See TracTickets for help on using tickets.