1
我有一个数据表格,包括几个项目,如textfield
,datefield
和combobox
。如何使用Siesta为combobox
制作选择项,我需要将Siesta的等待时间设置为30000ms以上,因为数据通过ajax
请求加载到combobox
。如何使用Bryntum Siesta测试在ExtJS组合框上进行选择?
有一个我已经使用过的代码段失败了,
t.it('Should create a new registration', function (t) {
t.chain(
{click: '>> button[text=New]'},
{waitForCQ: 'regdata[title=New Registration]'},
{click: '>> firstnamefld[xtype=firstnamefld]'},
{type: 'Siesta Reg', target: '>> firstnamefld[xtype=firstnamefld]'},
{click: '>> lastnamefld[xtype=lastnamefld]'},
{type: 'Test One', target: '>> lastnamefld[xtype=lastnamefld]'},
{click: '>> datefld[xtype=datefld]'},
{type: '11.10.2017', target: '>> checkinfld[xtype=checkinfld]'}, //Probably that's not correct way to choose date on datefield but it works
//Here is making ajax request to load data in combo.but Siesta isn't waiting for selection.
//I shouldn't use 'type' for this part but I couldn't find any proper property.
{click: '>> groupcombo[xtype=groupcombo]'},
{type: 'Group One', target: '>> groupcombo[xtype=groupcombo]'}
亲爱的@SamuraiJack我用't.cq1','setValue'方法使用链; '函数(下一个)t.cq1('typecombo [xtype = typecombo]')。setValue('GOO') next() }'但是当我运行测试时,它选择了组合内部的值。但接受测试通过:| –
对,“setValue”是一个Ext字段类的方法,它不会在测试中创建任何断言。 – SamuraiJack