Get help with testing, discuss unit testing strategies etc.


Post by texxok »

Hello guys,

I have ExtJS 5 app with theme button. So after change the url changes too -> cross page testing.

But after I change the page, load any object and than trying to click it, i get "TypeError: offset is null".

I guess I am somehow loading the old page object ? :shock: Because when I pass it, it's showing it got something.
Could you give me a hint how to do it, or let me know what am I doing wrong?

My code:
StartTest(function (t) {
    
    var Ext         = t.Ext();
    var window      = t.global;
    var document    = window.document;
    
    var grid;
     t.it('Change the theme',function(t){
                      ... 
                      function(next){
                            t.waitForPageLoad(next)
                            t.click(the-change-page-button)
                        }
     })

   t.it('Waiting for grid load',function(t){
        t.waitForRowsVisible('>>grid[title=My Grid]',function(t){
            grid = Ext.ComponentQuery.query('>>grid[title=My Grid]')[0]
        })
    })  
    
    t.it('TEST',function(t){
        t.click(grid)  // <- bodyoffset is null ?!
    })
In the harness, I got:
separateContext     : true,
hostPageUrl : ...,
url: 'test.t.js'
I was trying to do it according to your tutorial https://www.bryntum.com/docs/siesta/#!/g ... ge_testing
and your example file.

I could split the test into multiple files, but I wanted to learn cross page function anyway...

Thank you for the help!

Post by mats »

Do you have the licensed version?

Can you provide a test case?

Post by texxok »

Thank you for your quick response.
Unfortunately this problem is not on my prirority list right now. Maybe I will get to it later.

Post Reply