github.com/hernad/nomad@v1.6.112/ui/tests/pages/components/job-editor.js (about)

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