vault/ui/tests/pages/access/methods.js
Hamid Ghaf e55c18ed12
adding copyright header (#19555)
* adding copyright header

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

25 lines
619 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { create, attribute, visitable, collection, hasClass, text } from 'ember-cli-page-object';
export default create({
visit: visitable('/vault/access/'),
navLinks: collection('[data-test-link]', {
isActive: hasClass('active'),
text: text(),
scope: '[data-test-sidebar]',
}),
backendLinks: collection('[data-test-auth-backend-link]', {
path: text('[data-test-path]'),
id: attribute('data-test-id', '[data-test-path]'),
}),
findLinkById(id) {
return this.backendLinks.filterBy('id', id)[0];
},
});