2023-04-10 15:36:59 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2018-08-23 00:36:04 +00:00
|
|
|
import { clickable, hasClass, isPresent, text } from 'ember-cli-page-object';
|
|
|
|
import { codeFillable, code } from 'nomad-ui/tests/pages/helpers/codemirror';
|
|
|
|
|
|
|
|
import error from 'nomad-ui/tests/pages/components/error';
|
|
|
|
|
|
|
|
export default () => ({
|
2018-08-23 17:26:20 +00:00
|
|
|
isPresent: isPresent(),
|
|
|
|
|
2023-02-13 20:51:55 +00:00
|
|
|
planError: error('data-test-error'),
|
|
|
|
parseError: error('data-test-error'),
|
|
|
|
runError: error('data-test-error'),
|
2018-08-23 00:36:04 +00:00
|
|
|
|
|
|
|
plan: clickable('[data-test-plan]'),
|
|
|
|
cancel: clickable('[data-test-cancel]'),
|
|
|
|
run: clickable('[data-test-run]'),
|
|
|
|
|
|
|
|
cancelEditing: clickable('[data-test-cancel-editing]'),
|
|
|
|
cancelEditingIsAvailable: isPresent('[data-test-cancel-editing]'),
|
|
|
|
|
|
|
|
planOutput: text('[data-test-plan-output]'),
|
|
|
|
|
|
|
|
planHelp: {
|
|
|
|
isPresent: isPresent('[data-test-plan-help-title]'),
|
|
|
|
title: text('[data-test-plan-help-title]'),
|
|
|
|
message: text('[data-test-plan-help-message]'),
|
|
|
|
dismiss: clickable('[data-test-plan-help-dismiss]'),
|
|
|
|
},
|
|
|
|
|
|
|
|
editor: {
|
|
|
|
isPresent: isPresent('[data-test-editor]'),
|
|
|
|
contents: code('[data-test-editor]'),
|
|
|
|
fillIn: codeFillable('[data-test-editor]'),
|
|
|
|
},
|
|
|
|
|
|
|
|
dryRunMessage: {
|
|
|
|
scope: '[data-test-dry-run-message]',
|
|
|
|
title: text('[data-test-dry-run-title]'),
|
|
|
|
body: text('[data-test-dry-run-body]'),
|
|
|
|
errored: hasClass('is-warning'),
|
|
|
|
succeeded: hasClass('is-primary'),
|
|
|
|
},
|
|
|
|
});
|