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