mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-01 03:09:12 +00:00
Fix broken tests
This commit is contained in:
parent
248e44e9db
commit
fe9dc90454
@ -5,8 +5,9 @@ import { IDatasetExportPolicy } from 'wherehows-web/typings/api/datasets/complia
|
||||
import { IExportPolicyTable } from 'wherehows-web/typings/app/datasets/export-policy';
|
||||
import { get, set } from '@ember/object';
|
||||
import { action, computed } from '@ember-decorators/object';
|
||||
import { or } from '@ember-decorators/object/computed';
|
||||
import ComputedProperty from '@ember/object/computed';
|
||||
import { or } from '@ember/object/computed';
|
||||
// import { or } from '@ember-decorators/object/computed';
|
||||
// import ComputedProperty, { or } from '@ember/object/computed';
|
||||
|
||||
enum ExportPolicyLabels {
|
||||
UGC = 'User Generated Content - data directly created by the member',
|
||||
@ -67,8 +68,8 @@ export default class ComplianceExportPolicy extends Component.extend({
|
||||
* @type {boolean}
|
||||
* @memberof ComplianceExportPolicy
|
||||
*/
|
||||
@or('isEditing', 'shouldShowMorePolicyData')
|
||||
shouldShowAllExportPolicyData: ComputedProperty<boolean>;
|
||||
// @or('isEditing', 'shouldShowMorePolicyData')
|
||||
shouldShowAllExportPolicyData = or('isEditing', 'shouldShowMorePolicyData');
|
||||
|
||||
/**
|
||||
* The export policy data extracted directly from the api response, passed in from the dataset-compliance
|
||||
@ -86,11 +87,7 @@ export default class ComplianceExportPolicy extends Component.extend({
|
||||
*/
|
||||
@computed('exportPolicyData', 'isEditing')
|
||||
get datasetExportPolicy(): Array<IExportPolicyTable> {
|
||||
const exportPolicyData = get(this, 'exportPolicyData');
|
||||
|
||||
if (!exportPolicyData) {
|
||||
return [];
|
||||
}
|
||||
const exportPolicyData = <IDatasetExportPolicy>(get(this, 'exportPolicyData') || {});
|
||||
|
||||
return policyKeys.map(key => {
|
||||
const dataType = ExportPolicyKeys[key];
|
||||
|
||||
@ -2,20 +2,20 @@
|
||||
{{#if isEditing}}
|
||||
|
||||
<div class="container action-bar__content">
|
||||
<button
|
||||
class="nacho-button nacho-button--large-inverse action-bar__item"
|
||||
title="{{unless isDatasetFullyClassified
|
||||
'Ensure you have provided a yes/no value for all dataset tags'
|
||||
'Save'}}"
|
||||
onclick={{action metrics.trackOnAction (action "saveCompliance")}} disabled={{shouldDisableEditSaving}}>
|
||||
Save
|
||||
</button>
|
||||
<button
|
||||
class="nacho-button nacho-button--large-inverse action-bar__item"
|
||||
title="{{unless isDatasetFullyClassified
|
||||
'Ensure you have provided a yes/no value for all dataset tags'
|
||||
'Save'}}"
|
||||
onclick={{action "saveCompliance"}} disabled={{shouldDisableEditSaving}}>
|
||||
Save
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="nacho-button nacho-button--large nacho-button--secondary action-bar__item"
|
||||
onclick={{action metrics.trackOnAction (action "onCancel")}}>
|
||||
Cancel
|
||||
</button>
|
||||
<button
|
||||
class="nacho-button nacho-button--large nacho-button--secondary action-bar__item"
|
||||
onclick={{action "onCancel"}}>
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{{/if}}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find, click } from '@ember/test-helpers';
|
||||
import { render, find, click, waitFor } from '@ember/test-helpers';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
const header = '.metadata-prompt__header__text';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user