You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my work with the DOM Testing a get an other issue with testing applications in this testing framework:
if I init my application for example by this:
setup(function(){
var Option = {container:"Filebrowser"};
FB.init(Option);
});
(it a mocha notification for tdd)
Igot the problem, that the application isnt ready. This means all HTML stuff that will be loaded by the application isnt available, allthoug i started testing after loading the complete HTML stuff. This isnt the a problem of document.readyState. This is a problem of the differnt loading-times of the application itself.
I solved this by using a ready event inside of the application and it works:
test("Default Container with id=FB created",function(){
FB.ready(function(){
assert.that("",has.tag("Filebrowser"));
});
});
But is that a good way of testing? Could we get these things into the testing framework, maybe by settings?
Otherwise i can set some timeout with mocha, but this isn`t a good way to, I think.
Nobody could tell me, when the application is completly ready with thier dom building stuff.
The text was updated successfully, but these errors were encountered:
This is more a discussion of cool testing, what means: use setup/teardown (tdd in mocha).
If you want it dirty, you can init your Application before you start your testing stuff. But then you lost your chance of testing differnt option situation (for example) and you have to change your testing Stituation over and over. This is not that, what i want for a dom testing system.
I will add some examples with the application ready (compromise).
In my work with the DOM Testing a get an other issue with testing applications in this testing framework:
if I init my application for example by this:
(it a mocha notification for tdd)
I
got the problem, that the application isn
t ready. This means all HTML stuff that will be loaded by the application isnt available, allthoug i started testing after loading the complete HTML stuff. This isn
t the a problem of document.readyState. This is a problem of the differnt loading-times of the application itself.I solved this by using a
ready
event inside of the application and it works:But is that a good way of testing? Could we get these things into the testing framework, maybe by settings?
Otherwise i can set some timeout with mocha, but this isn`t a good way to, I think.
Nobody could tell me, when the application is completly ready with thier dom building stuff.
The text was updated successfully, but these errors were encountered: