Get help with testing, discuss unit testing strategies etc.


Post by pelicaneng »

I'm getting that error when attempting to execute a very simple project via the command line. Specifically, this is my test:
StartTest(function(t) {
    t.chain(
          {waitForCQ: 'login_panel'},
    );
});
When executing it in the Siesta web UI it works fine. Doing
node index_node.js
from the command line throws the error:
fail 1 - Test  threw an exception
Need to include `action` property or shortcut property in the step config: {"waitForCQ": "login_panel"}
The "index_node.js" project file is:
let Siesta = require('./siesta/index.js');
let project = module.exports = new Siesta.Project.NodeJS();

project.configure({
    title: 'Tests'
});

project.plan([
    'ui/AppLaunch.js'
]);
Using Siesta 5.2.2, Ext JS 6.5.3 Modern.

Thoughts?


- bill

Post by Maxim Gorkovsky »

Hello.
Try full action name?
{ waitForComponentQuery : '...' }

Post by pelicaneng »

Alas:
fail 1 - Test  threw an exception
Need to include `action` property or shortcut property in the step config: {"waitForComponentQuery": "login_panel"}

Post by mats »

To use the Ext JS layer you need to use the Ext JS Project class, not Node.
new Siesta.Project.ExtJS();

Post by jminutella »

Hey, sorry to bump up this thread a few weeks later but I'm also getting the same issue.

I have a couple of Ext JS apps with tests so how can I run these same tests in Node so that I can integrate them into our build process?

Thanks!

Post by mats »

You cannot test a web app using Node, Node is for testing non-browser code (unless to import a web mock lib like JsDOM https://www.npmjs.com/package/jsdom)

Post Reply