mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-12 11:17:01 +00:00

* Module consolidation on datahub-web - clean up to some OS logic from previous update - initial implementation of virtual assistant * Fix accidental change to datahub user module license
50 lines
1.7 KiB
TypeScript
50 lines
1.7 KiB
TypeScript
import { module, test } from 'qunit';
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
import { render, settled } from '@ember/test-helpers';
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
|
|
import { MirageTestContext } from '@datahub/utils/types/vendor/ember-cli-mirage/mirage-tests';
|
|
import setup from '@datahub/shared/mirage-addon/scenarios/entity-config';
|
|
import { IBaseEntity } from '@datahub/metadata-types/types/entity';
|
|
import { testUrn, testTarget } from '@datahub/shared/mirage-addon/test-helpers/entity-configs';
|
|
import { baseClass } from '@datahub/shared/components/entity-alert-banner';
|
|
|
|
module('Integration | Component | configurable/containers/entity-feature-configs', function(hooks): void {
|
|
setupRenderingTest(hooks);
|
|
setupMirage(hooks);
|
|
|
|
test('Correctly renders configurable feature based on configs fetched', async function(this: MirageTestContext, assert): Promise<
|
|
void
|
|
> {
|
|
setup(this.server);
|
|
|
|
const testEntity: IBaseEntity = {
|
|
urn: testUrn,
|
|
removed: false
|
|
};
|
|
|
|
const configurableFeatureClassSelector = `.${baseClass}`;
|
|
|
|
await render(hbs`
|
|
<Configurable::Containers::EntityFeatureConfigs
|
|
@entity={{this.entity}}
|
|
@targetFeature={{this.targetFeature}}
|
|
>
|
|
<EntityAlertBanner />
|
|
</Configurable::Containers::EntityFeatureConfigs>
|
|
`);
|
|
|
|
// TODO META-11247: Fix issue with mirage not importing model into data portal
|
|
// assert.dom(configurableFeatureClassSelector).doesNotExist();
|
|
|
|
this.setProperties({
|
|
entity: testEntity,
|
|
targetFeature: testTarget
|
|
});
|
|
|
|
await settled();
|
|
|
|
assert.dom(configurableFeatureClassSelector).exists();
|
|
});
|
|
});
|