Charlie Tran 84efa73098
fix (frontend): Partially fixes lineage issues and dataset API handling (#1874)
* Initial fix for lineage graph

* Fixes broken test by lineage fix commit and returns empty response instead of 500 for upstreams
2020-09-14 19:09:02 -07:00

33 lines
1.0 KiB
TypeScript

import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import { DatasetEntity } from '@datahub/data-models/entity/dataset/dataset-entity';
module('Integration | Component | dynamic-components/entity/field', function(hooks) {
setupRenderingTest(hooks);
test('it renders', async function(assert) {
const fakeSeedInformation = {
description: `Pikachu's special dataset`
};
const testUnderlyingDataset = new DatasetEntity(
'pikachu',
(fakeSeedInformation as unknown) as Com.Linkedin.Dataset.Dataset
);
this.setProperties({
entity: testUnderlyingDataset,
className: 'test-class'
});
await render(hbs`
<DynamicComponents::Entity::Field
@options={{hash fieldName="description" className=this.className}}
@entity={{this.entity}}
/>
`);
assert.dom('.test-class').hasText(`Pikachu's special dataset`, 'Renders the expected field and class name');
});
});