2023-03-15 16:00:52 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
import { attribute, clickable, isVisible, focusable, text } from 'ember-cli-page-object';
|
2021-12-17 03:44:29 +00:00
|
|
|
import { triggerEvent, focus } from '@ember/test-helpers';
|
2018-06-26 21:35:47 +00:00
|
|
|
|
|
|
|
export default {
|
2018-09-25 16:28:26 +00:00
|
|
|
async focusContainer() {
|
|
|
|
await focus('.has-copy-button');
|
|
|
|
},
|
|
|
|
tooltipText: text('[data-test-hover-copy-tooltip-text]', {
|
|
|
|
testContainer: '#ember-testing',
|
|
|
|
}),
|
2018-06-26 21:35:47 +00:00
|
|
|
wrapperClass: attribute('class', '[data-test-hover-copy]'),
|
|
|
|
buttonIsVisible: isVisible('[data-test-hover-copy-button]'),
|
2018-09-25 16:28:26 +00:00
|
|
|
click: clickable('[data-test-hover-copy-button]'),
|
|
|
|
focus: focusable('[data-test-hover-copy-button]'),
|
|
|
|
|
|
|
|
async mouseEnter() {
|
|
|
|
await triggerEvent('[data-test-tooltip-trigger]', 'mouseenter');
|
|
|
|
},
|
2018-06-26 21:35:47 +00:00
|
|
|
};
|