github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/tests/pages/components/job-editor.js (about)

     1  import { clickable, hasClass, isPresent, text } from 'ember-cli-page-object';
     2  import { codeFillable, code } from 'nomad-ui/tests/pages/helpers/codemirror';
     3  
     4  import error from 'nomad-ui/tests/pages/components/error';
     5  
     6  export default () => ({
     7    scope: '[data-test-job-editor]',
     8  
     9    isPresent: isPresent(),
    10  
    11    planError: error('data-test-plan-error'),
    12    parseError: error('data-test-parse-error'),
    13    runError: error('data-test-run-error'),
    14  
    15    plan: clickable('[data-test-plan]'),
    16    cancel: clickable('[data-test-cancel]'),
    17    run: clickable('[data-test-run]'),
    18  
    19    cancelEditing: clickable('[data-test-cancel-editing]'),
    20    cancelEditingIsAvailable: isPresent('[data-test-cancel-editing]'),
    21  
    22    planOutput: text('[data-test-plan-output]'),
    23  
    24    planHelp: {
    25      isPresent: isPresent('[data-test-plan-help-title]'),
    26      title: text('[data-test-plan-help-title]'),
    27      message: text('[data-test-plan-help-message]'),
    28      dismiss: clickable('[data-test-plan-help-dismiss]'),
    29    },
    30  
    31    editorHelp: {
    32      isPresent: isPresent('[data-test-editor-help-title]'),
    33      title: text('[data-test-editor-help-title]'),
    34      message: text('[data-test-editor-help-message]'),
    35      dismiss: clickable('[data-test-editor-help-dismiss]'),
    36    },
    37  
    38    editor: {
    39      isPresent: isPresent('[data-test-editor]'),
    40      contents: code('[data-test-editor]'),
    41      fillIn: codeFillable('[data-test-editor]'),
    42    },
    43  
    44    dryRunMessage: {
    45      scope: '[data-test-dry-run-message]',
    46      title: text('[data-test-dry-run-title]'),
    47      body: text('[data-test-dry-run-body]'),
    48      errored: hasClass('is-warning'),
    49      succeeded: hasClass('is-primary'),
    50    },
    51  });