textfield
を入力してからをクリックしてください。をBryntum Siesta Testでクリックしてください。全体のテストプロセスが成功してきただけ「保存」ボタンは、このクリックイベントに応答せず、続けてこう述べています。Ext.buttonのクリックイベントがBryntum Siesta Testのレスポンスではありません
Waited too long for: componentQuery "datatoolbar[id=datatoolbar-1100]"
Failed assertion `waitForComponentQuery`
Condition was not fullfilled during 10000ms
にはどうすればBryntumシエスタの可視ボタンのイベントをクリックして実行できますか?ここ
Test.js
describe('Testing Update Process', function (t) {
t.it('Should to login with correct creds.', function (t) {
t.chain(
{waitForCQ: 'window[title=Login]'},
{click: '>> textfield[itemId=userName]'},
{type: '[email protected]', target:'>> textfield[itemId=userName]'},
{click: '>> textfield[name=password]'},
{type: 'superSecretPass', target:'>> textfield[name=password]'},
{click: '>> button[text=Submit]', desc: 'Submit process is succeed!'}
)
})
t.it('Login window should be invisible', function (t) {
t.chain(
{waitForCQNotVisible: 'window[title=Login]', desc: 'Login window is hidden now!'}
)
})
t.it('Should open Folio grid', function (t) {
t.chain(
{waitForCQ: 'treelist[itemId=navigationTreeList]', desc: 'Wait for treelist'},
{click: '>> treelistitem[id=ext-treelistitem-6]', desc: 'Clicks Folio item'},
{waitForCQ: 'treelistitem[id=ext-treelistitem-7]', desc: 'Wait for treelist sub-item: Folios'},
{click: '>> treelistitem[id=ext-treelistitem-7]', desc: 'Clicks Folios'}
)
})
t.it('Should click on Edit button', function (t) {
t.chain(
{waitForCQ: 'gridview[id=gridview-1067]'},
{click: '>> button[id=button-1087]', desc: 'Clicks on Edit button'}
)
})
t.it('Should update Client Name', function (t) {
t.chain(
{click: '>> textfield[name=clientname]'},
{type: 'Siesta Testing for Update', target: '>> textfield[name=clientname]', desc: 'Types lorem ipsum data'}
)
})
//This last part is giving error and test becomes failure.
t.it('Should Save the last changes', function (t) {
t.chain(
{waitForCQ: 'datatoolbar[id=datatoolbar-1100]'},
{click: '>> button[id=button-1104]', desc: 'Clicks on Save, All Succeed :-)'}
)
})
})
は、データフォームとテストスニペットのスクリーンショットです。上記のように、私はにwaitForCQ
を使用しました。を保存しました。ボタンをラップしています。また、私はclickイベントを自分で呼び出そうとしましたが、エラーも発生します:Wait for button[id=button-1104] to appear
と失敗です。
ボタンはすでに可視でラップされています。DOM要素はフォームデータ(ラベルとテキストフィールドを含む)とdatatoolbar(ボタンを含む)です。
。 – Alexander
ありがとうございます@Alexanderを示してください。私は堅実な方法でクエリをリファクタリングします。 –