github.com/zhizhiboom/nomad@v0.8.5-0.20180907175415-f28fd3a1a056/ui/tests/pages/allocations/task/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  export default create({
    12    visit: visitable('/allocations/:id/:name'),
    13  
    14    title: text('[data-test-title]'),
    15    state: text('[data-test-state]'),
    16    startedAt: text('[data-test-started-at]'),
    17  
    18    breadcrumbs: collection('[data-test-breadcrumb]', {
    19      id: attribute('data-test-breadcrumb'),
    20      text: text(),
    21      visit: clickable(),
    22    }),
    23  
    24    breadcrumbFor(id) {
    25      return this.breadcrumbs.toArray().find(crumb => crumb.id === id);
    26    },
    27  
    28    hasAddresses: isPresent('[data-test-task-addresses]'),
    29    addresses: collection('[data-test-task-address]', {
    30      name: text('[data-test-task-address-name]'),
    31      isDynamic: text('[data-test-task-address-is-dynamic]'),
    32      address: text('[data-test-task-address-address]'),
    33    }),
    34  
    35    events: collection('[data-test-task-event]', {
    36      time: text('[data-test-task-event-time]'),
    37      type: text('[data-test-task-event-type]'),
    38      message: text('[data-test-task-event-message]'),
    39    }),
    40  
    41    error: {
    42      isPresent: isPresent('[data-test-error]'),
    43      title: text('[data-test-error-title]'),
    44      message: text('[data-test-error-message]'),
    45      seekHelp: clickable('[data-test-error-message] a'),
    46    },
    47  });