mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-12 11:17:01 +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
29 lines
1.1 KiB
TypeScript
29 lines
1.1 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 { stubService } from '@datahub/utils/test-helpers/stub-service';
|
|
|
|
module('Integration | Component | dynamic-components/wiki-link', function(hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test('it renders', async function(assert) {
|
|
stubService('configurator', {
|
|
getConfig(): unknown {
|
|
return { appHelp: 'https://www.serebii.net/pokedex-swsh/pikachu/' };
|
|
}
|
|
});
|
|
|
|
const sampleRenderProps = {
|
|
name: 'dynamic-components/wiki-link',
|
|
options: { wikiKey: 'appHelp', className: 'pikachu-link' }
|
|
};
|
|
this.set('props', sampleRenderProps);
|
|
|
|
await render(hbs`{{component this.props.name options=this.props.options}}`);
|
|
assert.dom('.dynamic-wiki-link').exists('Renders the link as expected');
|
|
assert.dom('.pikachu-link').exists('Renders with our custom class name');
|
|
assert.dom('.pikachu-link').hasTextContaining('https://www.serebii.net/pokedex-swsh/pikachu/');
|
|
});
|
|
});
|