Need help in configuring correct paths for DOH

269 views Asked by At

I'm trying to get DOH testing working for my company's upcoming platform, but I can't figure out the right combination of paths. Our file structure looks like this:

/dojo15
  /release
    /dojo
       /dojo
          dojo.js
          dojoExt.js
  /dojo
     dojo.js
  /util
     /doh
/js
  mainLib.js
  /tests
     base.js

This was created by our contractors, so unfortunately there are some things I have to figure out as I'm going along.

  1. The "release" directory is what is used on our pages.
  2. The "util" directory doesn't exist in our release directory. (I'd like to avoid having to make a copy of it there.)
  3. I'm not entirely sure what they did with dojoExt.js there, but it seems to be required. I was able to make a simple "hello world" sort of test, but once I did dojo.require(js.mainLib), I got an error that dojo.behavior.add is not a method. So it seems to be they made a stripped-down dojo.js and put other required code in dojoExt.js.

My guess is that DOH is using the dojo in dojo15/dojo, but I need to include dojo15/release/dojo/dojo/dojoExt.js. I've tried every combination of dojoUrl, testModule, registerModulePath I can think of...also saw "boot" and "path" from other SE questions, even though I can't see in runner.html where they would even be used, but I tried throwing them in to see if they'd magically help anyway.

At the moment I don't really have the option to move code around, so I'm hoping to work this out with files where they currently are.

1

There are 1 answers

0
Royston Shufflebotham On

Did you try the bits I suggested over at a related question? We use the bits I detailed there to pull together a completely custom layout of dojo + util. Take a look at both boot and dojoUrl. I think it's runner.js that does most of the cunning stuff, rather than runner.html.

Is the problem that you can't arrange for dojoExt.js to get loaded? How does your other code arrange for it to get loaded? Is tests/base.js your test module?