open-vault/ui/tests/acceptance/access/methods-test.js

21 lines
725 B
JavaScript
Raw Normal View History

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';
import authPage from 'vault/tests/pages/auth';
2018-04-03 14:16:57 +00:00
module('Acceptance | /access/', function(hooks) {
setupApplicationTest(hooks);
hooks.beforeEach(function() {
return authPage.login();
});
2018-04-03 14:16:57 +00:00
test('it navigates', async function(assert) {
await page.visit();
2018-04-03 14:16:57 +00:00
assert.ok(currentRouteName(), 'vault.cluster.access.methods', 'navigates to the correct route');
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
});
});