Get help with testing, discuss unit testing strategies etc.


Post by chembali »

I have a large test suite containing a number of tests. A sample test code is shown below.

t.chain(

{ waitForCQ : 'tabpanel'},

{ moveCursorTo : "#contentRegion igx-maintoolbar [itemId=menuButton] => .x-btn-icon-el", offset : [7, 6] },

{ waitFor : "Target" , args : "[itemId=adminButtons] => .x-menu-item-text" },

{ waitFor: 2000},

{ moveCursorTo : "[itemId=adminButtons] => .x-menu-item-text", offset : [29, 16] },

We are currently on Siesta 3.0.2 version. All the tests are working fine in my automated test environment. I upgraded Siesta to 4.4.3 and many of the tests ( similar to the one above ) are failing with the below message.

fail 1 - Waited too long for: componentQuery "tabpanel"
Failed assertion `waitForComponentQuery`
Condition was not fullfilled during 30000ms

Is there any easy fix for this? Changing the existing scripts is going to be a lot of work. Appreciate any help on this.

Post by mats »

Any chance you can create a small test case that fails and upload it here so we can inspect it?

Post by chembali »

describe('Automate create of first environment in the admin screen', function(t) {

    t.it('Navigate to Environment and create new environment',function(t){

        t.chain(

				{ waitForCQ   : 'tabpanel'},

				{ moveCursorTo : "#contentRegion igx-maintoolbar [itemId=menuButton] => .x-btn-icon-el", offset : [7, 6] },

				{ waitFor : "Target" , args : "[itemId=adminButtons] => .x-menu-item-text" },

				{ waitFor: 2000},
				
				{ moveCursorTo : "[itemId=adminButtons] => .x-menu-item-text", offset : [29, 16] },
				
				{ waitFor: 3000},
				{ waitFor : "Target" , args : "menuitem[text=Environments] => .x-menu-item-text" },

				{ click : "menuitem[text=Environments] => .x-menu-item-text", offset : [26, 12] },

				{ action : "click", target : "#contentRegion igx-listdevenvview panel igx-addbutton[text=New] => .x-btn-button", offset : [18, 2] },

				
				{ action : "type", text : "SAGA_DEV" },

				 { waitFor: 3000}, 

				{ click : "#contentRegion igx-listdevenvview panel igx-editdevenv [itemId=devEnvTabPanel] panel[title=Details] form panel fieldcontainer[fieldLabel=Retention Period] [itemId=period] => .x-form-text", offset : [53, 13] },

				{ click : "#contentRegion igx-listdevenvview panel igx-editdevenv [itemId=devEnvTabPanel] panel[title=Details] form panel fieldcontainer[fieldLabel=Retention Period] [itemId=period] => .x-form-spinner-up", offset : [19, 7] },

				{ click : "#contentRegion igx-listdevenvview panel igx-savebutton[text=Save] => .saveButton", offset : [13, 10] },
				
				{ waitFor : "Target" , args : "[itemId=ok] => .x-btn-button" },

				{ click : "[itemId=ok] => .x-btn-button", offset : [37, 2] }

            )
        }
    )


}
)
Last edited by chembali on Fri Feb 23, 2018 1:28 pm, edited 1 time in total.

Post by mats »

1. Please always use CODE tags when posting code.
2. I meant a full test case, including a test subject (a demo app)

Post by chembali »

The above test used to work just fine in the Siesta 3.0.2 environment. But fails in the 4.4.3 environment ( in the waitForCQ line ).

Post by mats »

Please see my latest response above.

Post by chembali »

I added the CODE tag. I will check with my team and see if I can get a full test case. Meanwhile, please see if you can figure something out from the given code. Just wondering what ( in the new version ) could be causing the issue. Thank you.

Post by nickolay »

What is your Ext version? Your code looks fine.

Post by chembali »

My app is based on Ext JS 6.0.2.437

Post by nickolay »

Ok, not enough information to help you. Can you create a small self-contained test case, that will demonstrate the difference between Siesta versions?

Post Reply