mardi 3 février 2015

Loading test pages within a unit test in the firefox-addon-sdk

My add-on involves the user interface, and so to test it I decided to simply have a html page which will load and the tester can follow some instructions on the page.


Here is an example of loading the page:



exports["test interaction"] = function(assert, done) {
require("sdk/tabs").tabs.open({
url: "./tests/test-page.html",
onClose: function(tab) {
assert.pass("Done page test");
done();
});
};


However, after about 16 seconds the tests will always fail with two error messages:



fail:
Timed out (after: START)


and



fail:
Should not be any unexpected tabs open


Furthermore, and more importantly, my addon does not work at all using cfx test, while it works using cfx run on the same test pages.


Is there a way to load some HTML testing pages using cfx test?


Aucun commentaire:

Enregistrer un commentaire