Tried adding the updated waitFor and got the same TypeError.
Where should I add the waitForAppReady flag?
Support Forum
In the test descriptor config or in the harness config.
Ok, make sure the test page actually contains Ext.ComponentQuery. You can switch to context of different iframes in Chrome debugger.
Ok, make sure the test page actually contains Ext.ComponentQuery. You can switch to context of different iframes in Chrome debugger.
Read the API documentation
Sure. Check this guide for the "login" guide: https://www.bryntum.com/docs/siesta/#!/ ... _touch_app
Read the API documentation
I'm able to login using the following test. But I still get a type error when trying to do the component query. The test case doesn't start the error occurs before the login occurs.
StartTest(function(t) {
t.chain(
{
action: "type",
target: "input[name=j_username]",
text: "<user>"
},
{
action: "type",
target: "input[name=j_password]",
text: "<password>"
},
{
action: "click",
target: "button[type=submit]"
},
{
waitFor : function() { return t.global.Ext && t.global.Ext.ComponentQuery; }
}
// {
// action: "click",
// target: "button[id=button-1057] => .x-btn-button"
// },
// {
// action: "rightclick",
// target: "treeview[id=treeview-1125] => .x-tree-view"
// }
)
var result= t.global.Ext.ComponentQuery.query("treeview[id=treeview-1125]")[0].id;
t.diag(result);
t.waitForMs(30000);
}
)
Need to wait for the page load after you initiate the login with "click": https://www.bryntum.com/docs/siesta/#!/ ... orPageLoad
Also see https://www.bryntum.com/docs/siesta/#!/ ... fg-trigger to understand the concept of race condition.
Also see https://www.bryntum.com/docs/siesta/#!/ ... fg-trigger to understand the concept of race condition.
Read the API documentation
Yes, need to use the 'chain' syntax:
StartTest(function(t) {
t.chain(
{
action: "type",
target: "input[name=j_username]",
text: "<user>"
},
{
action: "type",
target: "input[name=j_password]",
text: "<password>"
},
{
action: "click",
target: "button[type=submit]"
},
{
waitFor : function() { return t.global.Ext && t.global.Ext.ComponentQuery; }
},
function() {
var result= t.global.Ext.ComponentQuery.query("treeview[id=treeview-1125]")[0].id;
t.diag(result);
}
// {
// action: "click",
// target: "button[id=button-1057] => .x-btn-button"
// },
// {
// action: "rightclick",
// target: "treeview[id=treeview-1125] => .x-tree-view"
// }
)
}
)