mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-11 18:56:41 +00:00

* Releases updated version of datahub-web client UI code * Fix typo in yarn lock * Change yarn lock to match yarn registry directories * Previous commit missed some paths * Even more changes to yarnlock missing in previous commit * Include codegen file for typings * Add files to get parity for datahub-web and current OS datahub-midtier * Add in typo fix from previous commit - change to proper license * Implement proper OS fix for person entity picture url * Workarounds for open source DH issues * Fixes institutional memory api and removes unopensourced tabs for datasets * Fixes search dataset deprecation and user search issue as a result of changes * Remove internal only options in the avatar menu
53 lines
1.7 KiB
TypeScript
53 lines
1.7 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 { IPropertiesPanelArgs } from '@datahub/shared/components/entity/properties-panel';
|
|
import { MockEntity } from '@datahub/data-models/entity/mock/mock-entity';
|
|
import { IStandardDynamicProperty } from '@datahub/data-models/types/entity/rendering/properties-panel';
|
|
|
|
module('Integration | Component | entity/properties-panel', function(hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test('it renders', async function(assert) {
|
|
const mockEntity = new MockEntity('someurn');
|
|
|
|
const properties: Array<IStandardDynamicProperty<keyof MockEntity | 'entityLink.link'>> = [
|
|
{
|
|
labelComponent: {
|
|
name: 'entity/properties-panel-label',
|
|
options: {
|
|
displayName: 'Display Name',
|
|
tooltipText: 'tooltip'
|
|
}
|
|
},
|
|
name: 'displayName'
|
|
},
|
|
{ displayName: 'Name', name: 'name' },
|
|
{
|
|
displayName: 'Link',
|
|
name: 'entityLink.link',
|
|
component: {
|
|
name: 'link/optional-value'
|
|
}
|
|
}
|
|
];
|
|
|
|
const arg: IPropertiesPanelArgs = {
|
|
entity: mockEntity,
|
|
options: {
|
|
columnNumber: 1,
|
|
standalone: true,
|
|
properties
|
|
}
|
|
};
|
|
this.setProperties(arg);
|
|
await render(hbs`<Entity::PropertiesPanel @entity={{entity}} @options={{options}} />`);
|
|
|
|
assert.dom().containsText('Display Name mock-entity Name mock entity Link mock entity');
|
|
assert.dom('[data-columns="1"]').exists();
|
|
assert.dom('[data-standalone="true"]').exists();
|
|
assert.equal(document.querySelector('.nacho-tooltip')?.getAttribute('data-title'), 'tooltip');
|
|
});
|
|
});
|