2018-08-14 16:19:50 -07:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
|
|
import { render } from '@ember/test-helpers';
|
|
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
|
|
import { nonHdfsUrn } from 'wherehows-web/mirage/fixtures/urn';
|
2019-08-31 20:51:14 -07:00
|
|
|
import { setMockConfig, resetConfig } from 'wherehows-web/services/configurator';
|
2018-08-14 16:19:50 -07:00
|
|
|
|
|
|
|
module('Integration | Component | datasets/dataset-relationships', function(hooks) {
|
|
|
|
setupRenderingTest(hooks);
|
|
|
|
|
2019-08-31 20:51:14 -07:00
|
|
|
hooks.beforeEach(function() {
|
|
|
|
setMockConfig({
|
|
|
|
showLineageGraph: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
hooks.afterEach(function() {
|
|
|
|
resetConfig();
|
|
|
|
});
|
|
|
|
|
2018-08-14 16:19:50 -07:00
|
|
|
test('component rendering', async function(assert) {
|
|
|
|
this.set('urn', nonHdfsUrn);
|
2019-08-31 20:51:14 -07:00
|
|
|
this.set('dataset', {
|
|
|
|
uri: nonHdfsUrn
|
|
|
|
});
|
2018-08-14 16:19:50 -07:00
|
|
|
|
|
|
|
await render(hbs`
|
2019-08-31 20:51:14 -07:00
|
|
|
{{#datasets/dataset-relationships urn=urn dataset=dataset}}
|
2018-08-14 16:19:50 -07:00
|
|
|
{{/datasets/dataset-relationships}}
|
|
|
|
`);
|
|
|
|
|
|
|
|
assert.ok(this.element, 'renders component into DOM');
|
|
|
|
});
|
|
|
|
});
|