Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New import export json action test #4225

Merged
merged 26 commits into from
Dec 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/plugins/exportAsJSONAction/ExportAsJSONAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import JSONExporter from '/src/exporters/JSONExporter.js';

import _ from 'lodash';
import { saveAs } from 'saveAs';
import uuid from "uuid";

export default class ExportAsJSONAction {
Expand All @@ -41,7 +40,7 @@ export default class ExportAsJSONAction {
this.calls = 0;
this.idMap = {};

this.JSONExportService = new JSONExporter(saveAs);
this.JSONExportService = new JSONExporter();
}

// Public
Expand All @@ -68,7 +67,6 @@ export default class ExportAsJSONAction {

this._write(this.root);
}

/**
* @private
* @param {object} domainObject
Expand Down Expand Up @@ -116,6 +114,7 @@ export default class ExportAsJSONAction {
return _.isEqual(child.identifier, id);
});
const copyOfChild = JSON.parse(JSON.stringify(child));

copyOfChild.identifier.key = uuid();
const newIdString = this._getId(copyOfChild);
const parentId = this._getId(parent);
Expand Down
252 changes: 0 additions & 252 deletions src/plugins/exportAsJSONAction/ExportAsJSONAction.spec.js

This file was deleted.

Loading