github.com/hernad/nomad@v1.6.112/ui/tests/pages/jobs/job/evaluations.js (about)

     1  /**
     2   * Copyright (c) HashiCorp, Inc.
     3   * SPDX-License-Identifier: MPL-2.0
     4   */
     5  
     6  import {
     7    attribute,
     8    clickable,
     9    create,
    10    collection,
    11    text,
    12    visitable,
    13  } from 'ember-cli-page-object';
    14  
    15  import error from 'nomad-ui/tests/pages/components/error';
    16  
    17  export default create({
    18    visit: visitable('/jobs/:id/evaluations'),
    19  
    20    evaluations: collection('[data-test-evaluation]', {
    21      id: text('[data-test-id]'),
    22    }),
    23  
    24    sortOptions: collection('[data-test-sort-by]', {
    25      id: attribute('data-test-sort-by'),
    26      sort: clickable(),
    27    }),
    28  
    29    sortBy(id) {
    30      return this.sortOptions.toArray().findBy('id', id).sort();
    31    },
    32  
    33    error: error(),
    34  });