github.com/hernad/nomad@v1.6.112/ui/tests/pages/components/two-step-button.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 import { 7 attribute, 8 clickable, 9 hasClass, 10 isPresent, 11 text, 12 } from 'ember-cli-page-object'; 13 14 export default (scope) => ({ 15 scope, 16 17 isPresent: isPresent(), 18 19 idle: clickable('[data-test-idle-button]'), 20 confirm: clickable('[data-test-confirm-button]'), 21 cancel: clickable('[data-test-cancel-button]'), 22 23 isRunning: hasClass('is-loading', '[data-test-confirm-button]'), 24 isDisabled: attribute('disabled', '[data-test-idle-button]'), 25 26 cancelIsDisabled: attribute('disabled', '[data-test-cancel-button]'), 27 confirmIsDisabled: attribute('disabled', '[data-test-confirm-button]'), 28 29 idleText: text('[data-test-idle-button]'), 30 cancelText: text('[data-test-cancel-button]'), 31 confirmText: text('[data-test-confirm-button]'), 32 confirmationMessage: text('[data-test-confirmation-message]'), 33 });