open-vault/ui/tests/acceptance/api-explorer/index-test.js
Hamid Ghaf 27bb03bbc0
adding copyright header (#19555)
* adding copyright header

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

28 lines
827 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/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');
});
});