Angel Garbarino d3a604b3bc
Continued work on standardizing button selectors (#30972)
* download-button

* remaining data-test-button-

* manual cherry pick

* more

* fix test
2025-06-13 18:47:58 -06:00

38 lines
1.0 KiB
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import {
create,
collection,
fillable,
text,
visitable,
value,
clickable,
isPresent,
} from 'ember-cli-page-object';
import { getter } from 'ember-cli-page-object/macros';
export default create({
visit: visitable('/vault/secrets/:backend/list/:id'),
visitRoot: visitable('/vault/secrets/:backend/list'),
configure: clickable('[data-test-secret-backend-configure]'),
configureIsPresent: isPresent('[data-test-secret-backend-configure]'),
tabs: collection('[data-test-secret-list-tab]'),
filterInput: fillable('[data-test-nav-input] input'),
filterInputValue: value('[data-test-nav-input] input'),
secrets: collection('[data-test-secret-link]', {
menuToggle: clickable('[data-test-popup-menu-trigger]'),
id: text(),
click: clickable(),
}),
menuItems: collection('.ember-basic-dropdown-content li', {
testContainer: '#ember-testing',
}),
backendIsEmpty: getter(function () {
return this.secrets.length === 0;
}),
});