mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-28 19:16:02 +00:00
fixes issue with getcompliancesteps for schemaless datasets versus datasets with a schema
This commit is contained in:
parent
3e03c342e8
commit
fcc1c5544b
@ -93,12 +93,10 @@ const complianceSteps = {
|
||||
|
||||
/**
|
||||
* Takes a map of dataset options and constructs the relevant compliance edit wizard steps to build the wizard flow
|
||||
* @param {{ hasSchema: boolean }} [{ hasSchema }={ hasSchema: true }] flag indicating if the dataset is schema-less
|
||||
* @returns {([x: number]: {name: string})}
|
||||
* @param {boolean} [hasSchema=true] flag indicating if the dataset has a schema or otherwise
|
||||
* @returns {({ [x: number]: { name: string } })}
|
||||
*/
|
||||
const getComplianceSteps = (
|
||||
{ hasSchema }: { hasSchema: boolean } = { hasSchema: true }
|
||||
): { [x: number]: { name: string } } => {
|
||||
const getComplianceSteps = (hasSchema: boolean = true): { [x: number]: { name: string } } => {
|
||||
// Step to tag dataset with PII data, this is at the dataset level for schema-less datasets
|
||||
const piiTaggingStep = { 0: { name: 'editDatasetLevelCompliancePolicy' } };
|
||||
|
||||
|
@ -19,7 +19,7 @@ test('getComplianceSteps function should behave as expected', function(assert) {
|
||||
|
||||
assert.deepEqual(result, complianceSteps, 'getComplianceSteps result is expected shape when no args are passed');
|
||||
|
||||
result = getComplianceSteps({ hasSchema: false });
|
||||
result = getComplianceSteps(false);
|
||||
assert.deepEqual(
|
||||
result,
|
||||
{ ...complianceSteps, ...piiTaggingStep },
|
||||
|
Loading…
x
Reference in New Issue
Block a user