open-vault/ui/tests/pages/components/hover-copy-button.js
Hamid Ghaf 27bb03bbc0
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

25 lines
750 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { attribute, clickable, isVisible, focusable, text } from 'ember-cli-page-object';
import { triggerEvent, focus } from '@ember/test-helpers';
export default {
async focusContainer() {
await focus('.has-copy-button');
},
tooltipText: text('[data-test-hover-copy-tooltip-text]', {
testContainer: '#ember-testing',
}),
wrapperClass: attribute('class', '[data-test-hover-copy]'),
buttonIsVisible: isVisible('[data-test-hover-copy-button]'),
click: clickable('[data-test-hover-copy-button]'),
focus: focusable('[data-test-hover-copy-button]'),
async mouseEnter() {
await triggerEvent('[data-test-tooltip-trigger]', 'mouseenter');
},
};