1

by.repeaterを使用して行プロパティによる検索を実装し、ui-grid で e2e を評価しようとしています。

アイデアは、by.repeater からの結果を、evaluate から取得した下のオブジェクト ID と行を持つ新しいオブジェクトにマップして、オブジェクトの新しい配列で ID によるフィルター処理を実行できるようにすることです。このようなもの:

return this.getGrid( gridId ).all( by.repeater('(rowRenderIndex, row) in  rowContainer.renderedRows track by $index') ).map(function(row, index){
        return {
            index: index,
            row: row,
            id: row.evaluate('row.entity.id') 
        };                
    }).then(function(maps){            
        return maps.find(function(e){
            return e.id === rowId;                   
        });  
    });    

行オブジェクトを使用または返すと、map 関数がハングするようです。このhttps://github.com/angular/protractor/issues/392: Add map() function to element.allによると、機能するはずですが、機能しません。何か案が?

ありがとう、デビッド。

4

1 に答える 1