github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/ui/tests/pages/storage/volumes/detail.js (about)

     1  import {
     2    attribute,
     3    clickable,
     4    collection,
     5    create,
     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('/csi/volumes/:id'),
    15  
    16    title: text('[data-test-title]'),
    17  
    18    health: text('[data-test-volume-health]'),
    19    provider: text('[data-test-volume-provider]'),
    20    externalId: text('[data-test-volume-external-id]'),
    21    hasNamespace: isPresent('[data-test-volume-namespace]'),
    22    namespace: text('[data-test-volume-namespace]'),
    23  
    24    breadcrumbs: collection('[data-test-breadcrumb]', {
    25      id: attribute('data-test-breadcrumb'),
    26      text: text(),
    27      visit: clickable(),
    28    }),
    29  
    30    breadcrumbFor(id) {
    31      return this.breadcrumbs.toArray().find(crumb => crumb.id === id);
    32    },
    33  
    34    ...allocations('[data-test-read-allocation]', 'readAllocations'),
    35    ...allocations('[data-test-write-allocation]', 'writeAllocations'),
    36  
    37    writeTableIsEmpty: isPresent('[data-test-empty-write-allocations]'),
    38    writeEmptyState: {
    39      headline: text('[data-test-empty-write-allocations-headline]'),
    40    },
    41  
    42    readTableIsEmpty: isPresent('[data-test-empty-read-allocations]'),
    43    readEmptyState: {
    44      headline: text('[data-test-empty-read-allocations-headline]'),
    45    },
    46  
    47    constraints: {
    48      accessMode: text('[data-test-access-mode]'),
    49      attachmentMode: text('[data-test-attachment-mode]'),
    50    },
    51  });