2018-09-25 16:28:26 +00:00
|
|
|
import { currentRouteName } from '@ember/test-helpers';
|
|
|
|
import { module, test } from 'qunit';
|
|
|
|
import { setupApplicationTest } from 'ember-qunit';
|
2018-04-03 14:16:57 +00:00
|
|
|
import page from 'vault/tests/pages/access/methods';
|
2018-09-25 16:28:26 +00:00
|
|
|
import authPage from 'vault/tests/pages/auth';
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
module('Acceptance | /access/', function (hooks) {
|
2018-09-25 16:28:26 +00:00
|
|
|
setupApplicationTest(hooks);
|
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
hooks.beforeEach(function () {
|
2018-09-25 16:28:26 +00:00
|
|
|
return authPage.login();
|
|
|
|
});
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
test('it navigates', async function (assert) {
|
2018-09-25 16:28:26 +00:00
|
|
|
await page.visit();
|
2018-04-03 14:16:57 +00:00
|
|
|
assert.ok(currentRouteName(), 'vault.cluster.access.methods', 'navigates to the correct route');
|
2018-09-25 16:28:26 +00:00
|
|
|
assert.ok(page.navLinks.objectAt(0).isActive, 'the first link is active');
|
|
|
|
assert.equal(page.navLinks.objectAt(0).text, 'Auth Methods');
|
2018-04-03 14:16:57 +00:00
|
|
|
});
|
|
|
|
});
|