open-nomad/ui/tests/pages/jobs/job/evaluations.js
2018-07-11 09:37:58 -07:00

22 lines
492 B
JavaScript

import { attribute, clickable, create, collection, text, visitable } from 'ember-cli-page-object';
export default create({
visit: visitable('/jobs/:id/evaluations'),
evaluations: collection('[data-test-evaluation]', {
id: text('[data-test-id]'),
}),
sortOptions: collection('[data-test-sort-by]', {
id: attribute('data-test-sort-by'),
sort: clickable(),
}),
sortBy(id) {
return this.sortOptions
.toArray()
.findBy('id', id)
.sort();
},
});