open-nomad/ui/tests/pages/jobs/job/evaluations.js
2022-01-20 09:54:56 -05:00

30 lines
563 B
JavaScript

import {
attribute,
clickable,
create,
collection,
text,
visitable,
} from 'ember-cli-page-object';
import error from 'nomad-ui/tests/pages/components/error';
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();
},
error: error(),
});