2018-09-25 16:28:26 +00:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
|
|
import { render } from '@ember/test-helpers';
|
2018-06-26 21:35:47 +00:00
|
|
|
import { create } from 'ember-cli-page-object';
|
|
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
|
|
import navHeader from 'vault/tests/pages/components/nav-header';
|
|
|
|
|
|
|
|
const component = create(navHeader);
|
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
module('Integration | Component | nav header', function (hooks) {
|
2018-09-25 16:28:26 +00:00
|
|
|
setupRenderingTest(hooks);
|
2018-06-26 21:35:47 +00:00
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
test('it renders', async function (assert) {
|
2018-09-25 16:28:26 +00:00
|
|
|
await render(hbs`
|
2022-09-23 14:18:20 +00:00
|
|
|
<div id="modal-wormhole"></div>
|
2018-09-25 16:28:26 +00:00
|
|
|
{{#nav-header as |h|}}
|
|
|
|
{{#h.home}}
|
|
|
|
Home!
|
|
|
|
{{/h.home}}
|
|
|
|
{{#h.items}}
|
|
|
|
Some Items
|
|
|
|
{{/h.items}}
|
|
|
|
{{#h.main}}
|
|
|
|
Main stuff here
|
|
|
|
{{/h.main}}
|
|
|
|
{{/nav-header}}
|
|
|
|
`);
|
2018-06-26 21:35:47 +00:00
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
assert.ok(component.ele, 'renders the outer element');
|
2022-10-18 15:46:02 +00:00
|
|
|
assert.strictEqual(component.homeText.trim(), 'Home!', 'renders home content');
|
|
|
|
assert.strictEqual(component.itemsText.trim(), 'Some Items', 'renders items content');
|
|
|
|
assert.strictEqual(component.mainText.trim(), 'Main stuff here', 'renders items content');
|
2018-09-25 16:28:26 +00:00
|
|
|
});
|
2018-06-26 21:35:47 +00:00
|
|
|
});
|