Angel Garbarino 967c241c15
Add API Explorer Link to Sidebar Nav under tools (#21578)
* wip

* add outlet and sidebar nav link

* add changelog

* fix tests

* address pr comment
2023-07-05 18:05:32 +00:00

28 lines
833 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { find, fillIn, visit, waitUntil } from '@ember/test-helpers';
import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
import authPage from 'vault/tests/pages/auth';
module('Acceptance | API Explorer', function (hooks) {
setupApplicationTest(hooks);
hooks.beforeEach(function () {
return authPage.login();
});
test('it filters paths after swagger-ui is loaded', async function (assert) {
await visit('/vault/tools/api-explorer');
await waitUntil(() => {
return find('[data-test-filter-input]').disabled === false;
});
await fillIn('[data-test-filter-input]', 'sys/health');
assert.dom('.opblock').exists({ count: 1 }, 'renders a single opblock for sys/health');
});
});