Get help with testing, discuss unit testing strategies etc.


Post by zombeerose »

@mats & @support_team

That's great if I don't have to specify the appropriate el. I was using your example (022-extjs-form) for a pattern so this should probably be updated to not use the inputEl?

The change you made for typing in the combo in 2 steps worked for me. Thanks!

I'm still confused about the precedence of options because as far as I understand, the UI stores the choices in the cookie so that everytime I reload the page, my settings persist. Does that mean I must flush my siesta cookies in order for my harness/test settings to be used again?

Post by nickolay »

zombeerose wrote:@mats & @support_team

That's great if I don't have to specify the appropriate el. I was using your example (022-extjs-form) for a pattern so this should probably be updated to not use the inputEl?
Yup, updating.
zombeerose wrote: I'm still confused about the precedence of options because as far as I understand, the UI stores the choices in the cookie so that everytime I reload the page, my settings persist. Does that mean I must flush my siesta cookies in order for my harness/test settings to be used again?
Thats right, but, the UI settings replaces the settings of the Harness only, not individual tests. So if you have "speedRun : false" for some specific test, UI setting doesn't apply at all.

Post by mats »

zombeerose wrote:
That's great if I don't have to specify the appropriate el. I was using your example (022-extjs-form) for a pattern so this should probably be updated to not use the inputEl?
Those tests are now updated :)

Post by zombeerose »

Follow-up:
I noticed the full-list of supported keyCodes for the type() method includes 'CAPS'.

However, I could not get the following test to pass:
StartTest(function(t) {
    t.diag('Text field');
   
    var cmp = Ext.create('Ext.form.field.Text',{
        fieldLabel: 'Text (CAPS)',
        width: 100,
        renderTo: Ext.getBody()
    });
    
    t.pass('Rendered');
    
    t.click(cmp, function(){
        // Siesta will pause slightly after typing
        t.type(cmp, '[CAPS]', function(){
            t.type(cmp, 'abc', function(){
                t.is(cmp.getValue(),'ABC', 'Correct value in field');
            });
        });
    });
});

Post by nickolay »

Not sure if pressing CAPS LOCK can be reliably emulated across all browsers. This should be possible with native events though (on the roadmap).

Post Reply