github.com/zhizhiboom/nomad@v0.8.5-0.20180907175415-f28fd3a1a056/ui/tests/pages/jobs/detail.js (about)

     1  import {
     2    attribute,
     3    create,
     4    collection,
     5    clickable,
     6    isPresent,
     7    text,
     8    visitable,
     9  } from 'ember-cli-page-object';
    10  
    11  import allocations from 'nomad-ui/tests/pages/components/allocations';
    12  
    13  export default create({
    14    visit: visitable('/jobs/:id'),
    15  
    16    tabs: collection('[data-test-tab]', {
    17      id: attribute('data-test-tab'),
    18      visit: clickable('a'),
    19    }),
    20  
    21    tabFor(id) {
    22      return this.tabs.toArray().findBy('id', id);
    23    },
    24  
    25    stats: collection('[data-test-job-stat]', {
    26      id: attribute('data-test-job-stat'),
    27      text: text(),
    28    }),
    29  
    30    statFor(id) {
    31      return this.stats.toArray().findBy('id', id);
    32    },
    33  
    34    ...allocations(),
    35  
    36    viewAllAllocations: text('[data-test-view-all-allocations]'),
    37  
    38    error: {
    39      isPresent: isPresent('[data-test-error]'),
    40      title: text('[data-test-error-title]'),
    41      message: text('[data-test-error-message]'),
    42      seekHelp: clickable('[data-test-error-message] a'),
    43    },
    44  
    45    recentAllocationsEmptyState: {
    46      headline: text('[data-test-empty-recent-allocations-headline]'),
    47    },
    48  });