Get help with testing, discuss unit testing strategies etc.


Post by arielalvarez88 »

var openAndCheckDialog = function (t, buttonSelector, dialogSelector) {

    Ext.ComponentQuery.query("#maintoolbar-add")[0].showMenu();  

    t.click(buttonSelector, function () {
     
        t.waitForComponentQueryVisible(selector, function(){
        });      
        
    });


};


t.it("Should open a creation form", function (t) {
    openAndCheckDialog(t, ".add-a", "dialog-a=");
});

t.it("Should open e creation form", function (t) {
    openAndCheckDialog(t, ".add-e", "dialog-e");
});

t.it("Should open t creation form", function (t) {
    openAndCheckDialog(t, ".add-t", "dialog-t");
});

t.it("Should open p creation form", function (t) {
    openAndCheckDialog(t, ".add-p", "dialog-p");
});


t.it("Should open n creation form", function (t) {
    openAndCheckDialog(t, ".add-n", "dialog-n");
});


t.it("Should open forum creation f", function (t) {
    openAndCheckDialog(t,".add-f", "dialog-f");
});
The last one always fails. I change the order and it is always the last one (it doesn't matter which is specifically is at the last place, that will fail). If a comment 1, all remaining will work. I have no Idea what is happening :S.

Post by nickolay »

This something specific to your app / test suite, you'll have to debug it yourself.

Post Reply