Get help with testing, discuss unit testing strategies etc.


Post by saikumar »

Hi, i have a scenario that "Clicking on one button displays options under it. These options count will vary based on the each content" .
For instance, I selected content A then clicked on Button(B) -> options will (x,y) display.
similarly, if I select other content B then clicked on Button(B)-> options will(x) display.

My question how to get all the options?? Where should i find options in DOM??

Post by mats »

You'll have to put a CSS class on your ComboBox List component, and then you can use 'selectorCountIs' to verify that the ComboBox contains correct nbr of items.

https://bryntum.com/docs/siesta/#!/api/ ... torCountIs

Post by saikumar »

After clicking, comboboxcomponent i am in debugger mode now. Just, checking for options names .but i couldn't find out in DOM and i am using the below code that to throws error.

var x = t.cq1(comboboxcomponent ).getStore(),
size = x.getCount();

Where will find out the options names in DOM?? because have to verify the option names as well.

Post by nickolay »

Sorry this question is more specific to your application than to Siesta, you'll have to figure out it yourself. Basically you can run any code in your test and it resides on the same page as your app - so you need to figure out the way for them to cooperate. This is typically achieved by giving specific CSS classes to DOM elements (for DOM queries) or specific properties to components (for Component queries).

Post Reply