mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-01 19:25:56 +00:00
Fixes failing tests
This commit is contained in:
parent
7d6a4b65f8
commit
7952a69f8b
@ -2,13 +2,10 @@
|
||||
<div class="container">
|
||||
<div class="dataset-meta-properties">
|
||||
<h3 class="dataset-name">
|
||||
{{compute
|
||||
(get (get-field-spec @fields "name") "compute")
|
||||
@model
|
||||
}}
|
||||
{{@model.nativeName}}
|
||||
</h3>
|
||||
|
||||
{{#if model.removed}}
|
||||
{{#if @model.removed}}
|
||||
<span class="removed-dataset dataset-pill">
|
||||
REMOVED
|
||||
|
||||
@ -32,7 +29,7 @@
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{#if model.deprecated}}
|
||||
{{#if @model.deprecated}}
|
||||
|
||||
<span class="deprecated-dataset dataset-pill">
|
||||
{{#link-to "datasets.dataset.tab" encodedUrn "properties"}}
|
||||
|
||||
@ -3,37 +3,28 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, waitUntil, find } from '@ember/test-helpers';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
import { urn } from 'wherehows-web/mirage/fixtures/urn';
|
||||
import sinon from 'sinon';
|
||||
import { resetConfig, setMockConfig } from 'wherehows-web/services/configurator';
|
||||
import { noop } from 'wherehows-web/utils/helpers/functions';
|
||||
import { startMirage } from 'wherehows-web/initializers/ember-cli-mirage';
|
||||
|
||||
module('Integration | Component | datasets/containers/dataset ownership', function(hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
hooks.beforeEach(function() {
|
||||
setMockConfig({});
|
||||
this.sinonServer = sinon.createFakeServer();
|
||||
this.sinonServer.respondImmediately = true;
|
||||
});
|
||||
|
||||
hooks.afterEach(function() {
|
||||
this.sinonServer.restore();
|
||||
resetConfig();
|
||||
});
|
||||
|
||||
test('it renders', async function(assert) {
|
||||
const lookupClass = '.dataset-owner-table__add-owner';
|
||||
this.setProperties({ urn: urn, setOwnershipRuleChange: noop });
|
||||
this.sinonServer.respondWith('GET', /\/api\/v2\/datasets.*/, [
|
||||
200,
|
||||
{ 'Content-Type': 'application/json' },
|
||||
JSON.stringify({})
|
||||
]);
|
||||
this.sinonServer.respondWith('GET', '/api/v1/owner/types', [
|
||||
200,
|
||||
{ 'Content-Type': 'application/json' },
|
||||
JSON.stringify([])
|
||||
]);
|
||||
const mirage = startMirage();
|
||||
|
||||
mirage.get('/api/v2/datasets', () => ({}));
|
||||
mirage.get('/api/v1/owners/types/', () => []);
|
||||
|
||||
await render(hbs`{{datasets/containers/dataset-ownership setOwnershipRuleChange=setOwnershipRuleChange urn=urn}}`);
|
||||
|
||||
@ -43,5 +34,6 @@ module('Integration | Component | datasets/containers/dataset ownership', functi
|
||||
'Add an owner',
|
||||
'shows dataset authors component'
|
||||
);
|
||||
mirage.shutdown();
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user