Get help with testing, discuss unit testing strategies etc.


Post by pelicaneng »

Some basic tests are working, but this fails:
describe('Sample', function (t) {

    var panel = Ext.create('Ext.Panel', {
        title: 'Title',
        items: [
            {
                xtype: 'textfield'
            }
        ]
    });

    Ext.create('Ext.Dialog', {items: [panel] }).show();

    t.chain(
        {waitForCQVisible: 'panel[title=Title]'},
        {click: '>>textfield'},
    );
});
with
TypeError: comp.getComponent is not a function
    at line 36812, character 36, of https://localhost:8000/tests/siesta/siesta-all.js
    at line 817, character 32, of https://localhost:8000/tests/siesta/siesta-all.js
    at line 37732, character 32, of https://localhost:8000/tests/siesta/siesta-all.js
    at line 817, character 32, of https://localhost:8000/tests/siesta/siesta-all.js
    at line 36719, character 29, of https://localhost:8000/tests/siesta/siesta-all.js
    at line 42, character 22, of https://localhost:8000/tests/siesta/siesta-all.js
    at line 36716, character 25, of https://localhost:8000/tests/siesta/siesta-all.js
    at line 817, character 32, of https://localhost:8000/tests/siesta/siesta-all.js
    at line 36738, character 36, of https://localhost:8000/tests/siesta/siesta-all.js
    at line 817, character 32, of https://localhost:8000/tests/siesta/siesta-all.js
Am I doing something stupid?

This is using Siesta Lite.

Thanks

- bill

Post by nickolay »

Modern support is not tested as intensively as classic. This looks like a bug, we'll investigate shortly.

Post by nickolay »

Sorry for delay. It worked with ExtJS 6.2.1, they've changed something since that.

Anyway, fixed now in sources. Fix will be available in the tomorrow nightly build (and next release), or since you use Siesta Lite, you can manually patch it for now. For that change this line in "siesta-all.js":
            // Sencha Touch: Form fields can have a child input component
            if (Ext && Ext.field && Ext.field.Field && comp instanceof Ext.field.Field && locateInputEl) {
to
            // Sencha Touch: Form fields can have a child input component
            if (Ext && Ext.field && Ext.field.Field && comp instanceof Ext.field.Field && locateInputEl  && comp.getComponent) {

Post by T007 »

I was experiencing a similar problem. Rather than a click action like the original poster, I'm doing a type action on the textfield. I got the same "TypeError: comp.getComponent is not a function" error.
{action: 'type', target: '>>#loginid', text: 'id'};
I downloaded the latest siesta lite and reran the test. The error is no longer there. However, the text actually does not get set into the text field, the text field remains blank.

Post by nickolay »

Hm.. So manually you can enter the text in that field? Its not read-only? What if you use "setValue" method of the component?

Post by T007 »

It is not read-only. If I use setValue on the component, it works.

Post Reply