1
私は非同期分度器テストを作成しましたが、done()関数を呼び出すべきかどうかは不明です。各ループのすべてのサブフォルダが完了した時点を確認するにはどうすればよいですか?下のコードを見れば、間違った場所にdone()が置かれていることがわかります。誰がどのように/私はどこに行う必要があるか教えてくれますか?非同期分度器テストからどのように戻ることができますか?
it('should make sure that there are no edit or delete buttons beside subfolders',function(done){
folderContentPg.subFolders.each(function(subFolder){
//get fid of subfolder
subFolder.getAttribute('fid').then(
function(subFolderFid){
expect(folderContentPg.subFolderDeleteBtn(subFolderFid).isPresent()).toBe(false);
expect(folderContentPg.subFolderEditBtn(subFolderFid).isPresent()).toBe(false);
}
);
done();
})
});
最初に 'done()'が必要ですか? – alecxe