From 58dec5aa0f885653b0d89924e91a09ce473ed316 Mon Sep 17 00:00:00 2001 From: Bogdan Cochior <bogdan.cochior@thinslices.com> Date: Wed, 25 Jul 2018 12:02:02 +0300 Subject: [PATCH] refactor(mts): move to class --- .../component-mts-package/config/default.js | 21 ++ packages/component-mts-package/config/test.js | 3 + packages/component-mts-package/package.json | 4 +- packages/component-mts-package/src/MTS.js | 167 ++++++++++++ packages/component-mts-package/src/main.js | 232 ----------------- .../src/mts-json-template.js | 12 +- packages/component-mts-package/src/output.xml | 31 +-- .../component-mts-package/src/template.json | 243 ------------------ .../component-mts-package/tests/MTS.test.js | 40 +++ packages/component-mts-package/tests/mocks.js | 89 +++++++ .../{src => tests}/sample.json | 0 .../{src => tests}/sample.xml | 0 12 files changed, 326 insertions(+), 516 deletions(-) create mode 100644 packages/component-mts-package/config/default.js create mode 100644 packages/component-mts-package/config/test.js create mode 100644 packages/component-mts-package/src/MTS.js delete mode 100644 packages/component-mts-package/src/main.js delete mode 100644 packages/component-mts-package/src/template.json create mode 100644 packages/component-mts-package/tests/MTS.test.js create mode 100644 packages/component-mts-package/tests/mocks.js rename packages/component-mts-package/{src => tests}/sample.json (100%) rename packages/component-mts-package/{src => tests}/sample.xml (100%) diff --git a/packages/component-mts-package/config/default.js b/packages/component-mts-package/config/default.js new file mode 100644 index 000000000..d42f3a2c2 --- /dev/null +++ b/packages/component-mts-package/config/default.js @@ -0,0 +1,21 @@ +const defaultParseXmlOptions = { + compact: true, + ignoreComment: true, + spaces: 2, + fullTagEmptyElement: true, +} + +const defaultConfig = { + doctype: 'article SYSTEM "JATS-archivearticle1-mathml3.dtd"', + dtdVersion: '1.1d1', + articleType: 'Research Article', + journalIdPublisher: 'research', + email: 'faraday@hindawi.com', + journalTitle: 'Bioinorganic Chemistry and Applications', + issn: '2474-7394', +} + +module.exports = { + defaultConfig, + defaultParseXmlOptions, +} diff --git a/packages/component-mts-package/config/test.js b/packages/component-mts-package/config/test.js new file mode 100644 index 000000000..f41006674 --- /dev/null +++ b/packages/component-mts-package/config/test.js @@ -0,0 +1,3 @@ +const defaultConfig = require('./default') + +module.exports = defaultConfig diff --git a/packages/component-mts-package/package.json b/packages/component-mts-package/package.json index 99c9b6106..2fe717375 100644 --- a/packages/component-mts-package/package.json +++ b/packages/component-mts-package/package.json @@ -7,7 +7,7 @@ "src" ], "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", + "test": "jest", "convert": "xml-js xml.xml --spaces 4 --out test.json" }, "repository": { @@ -27,7 +27,7 @@ }, "jest": { "verbose": true, - "testRegex": "/src/.*.test.js$" + "testRegex": "/tests/.*.test.js$" }, "publishConfig": { "access": "public" diff --git a/packages/component-mts-package/src/MTS.js b/packages/component-mts-package/src/MTS.js new file mode 100644 index 000000000..924e4a932 --- /dev/null +++ b/packages/component-mts-package/src/MTS.js @@ -0,0 +1,167 @@ +const fs = require('fs') +const convert = require('xml-js') +const { set } = require('lodash') +const logger = require('@pubsweet/logger') + +const mts = require('./mts-json-template') +const { defaultConfig, defaultParseXmlOptions } = require('../config/default') + +class MTS { + constructor(config = defaultConfig, options = defaultParseXmlOptions) { + this.config = config + this.options = options + this.jsonTemplate = mts.getJsonTemplate(config) + } + + async createXMLFile(json = {}, name = 'output.xml') { + const result = convert.json2xml(json, this.options) + + await fs.writeFile(name, result, err => { + if (err) return logger.error(err) + logger.info('Created XML file') + }) + } + + setMetadata(metadata, jsonTemplate) { + const titleGroup = { + 'article-title': + convert.xml2js(metadata.title, this.options) || 'Untitled', + } + const articleType = { + 'subj-group': [ + { + _attributes: { + 'subj-group-type': 'Article Type', + }, + subject: { + _text: metadata.type, + }, + }, + ], + } + set(jsonTemplate, 'article.front.article-meta.title-group', titleGroup) + set( + jsonTemplate, + 'article.front.article-meta.article-categories', + articleType, + ) + set( + jsonTemplate, + 'article.front.article-meta.abstract', + convert.xml2js(metadata.abstract, this.options) || '', + ) + + return jsonTemplate + } + + static setHistory(submitted, jsonTemplate) { + const date = new Date(submitted) + const parsedDate = { + date: { + _attributes: { + 'date-type': 'received', + }, + day: { + _text: date.getDay(), + }, + month: { + _text: date.getMonth(), + }, + year: { + _text: date.getFullYear(), + }, + }, + } + set(jsonTemplate, 'article.front.article-meta.history', parsedDate) + + return jsonTemplate + } + + static setFigures({ supplementary = [] }, jsonTemplate) { + const figs = supplementary.map((f, i) => ({ + label: { + _text: `Figure ${i + 1}`, + }, + graphic: { + _attributes: { + 'xlink:href': f.name, + 'xmlns:xlink': 'http://www.w3.org/1999/xlink', + }, + }, + })) + + set(jsonTemplate, 'article.body.fig', figs) + + return jsonTemplate + } + + static setContributors(authors = [], jsonTemplate) { + const contrib = authors.map((a, i) => ({ + _attributes: { + 'contrib-type': 'author', + corresp: a.isCorresponding ? 'yes' : 'no', + }, + role: { + _attributes: { + 'content-type': '1', + }, + }, + name: { + surname: { + _text: a.firstName, + }, + 'given-names': { + _text: a.lastName, + }, + prefix: { + _text: a.title || 'Dr.', + }, + }, + email: { + _text: a.email, + }, + xref: { + _attributes: { + 'ref-type': 'aff', + rid: `aff${i + 1}`, + }, + }, + })) + const aff = authors.map((a, i) => ({ + _attributes: { + id: `aff${i + 1}`, + }, + country: { + _text: a.affiliation, + }, + })) + + set( + jsonTemplate, + 'article.front.article-meta.contrib-group.contrib', + contrib, + ) + set(jsonTemplate, 'article.front.article-meta.contrib-group.aff', aff) + + return jsonTemplate + } + + composeJson(fragment = {}) { + const { + authors = [], + files = [], + metadata = { title: 'untitled', abstract: 'no abstract' }, + submitted = new Date(), + } = fragment + + return { + ...this.jsonTemplate, + ...this.setMetadata(metadata, this.jsonTemplate), + ...this.constructor.setContributors(authors, this.jsonTemplate), + ...this.constructor.setHistory(submitted, this.jsonTemplate), + ...this.constructor.setFigures(files, this.jsonTemplate), + } + } +} + +module.exports = MTS diff --git a/packages/component-mts-package/src/main.js b/packages/component-mts-package/src/main.js deleted file mode 100644 index c894403e7..000000000 --- a/packages/component-mts-package/src/main.js +++ /dev/null @@ -1,232 +0,0 @@ -const fs = require('fs') -const convert = require('xml-js') -const { set } = require('lodash') -const logger = require('@pubsweet/logger') - -const mts = require('./mts-json-template') - -const options = { - compact: true, - ignoreComment: true, - spaces: 2, - fullTagEmptyElement: true, -} - -const createXMLFile = (json = {}) => { - const result = convert.json2xml(json, options) - - fs.writeFile('output.xml', result, err => { - if (err) return logger.error(err) - logger.info('Created XML file') - }) -} - -const fragment = { - id: '57c7560b-6c1c-480d-a207-cb388d60a213', - type: 'fragment', - files: { - coverLetter: [], - manuscripts: [ - { - id: - '57c7560b-6c1c-480d-a207-cb388d60a213/170ef7b5-bdfd-4637-908d-a693b8c07928', - name: 'Revolut-EUR-Statement-Jan 8, 2018.pdf', - size: 63347, - }, - ], - supplementary: [ - { - id: - '57c7560b-6c1c-480d-a207-cb388d60a213/170ef7b5-bdfd-4637-908d-a693b8c07928', - name: 'SUP__Revolut-EUR-Statement-Jan 8, 2018.pdf', - size: 63347, - }, - ], - responseToReviewers: [], - }, - owners: [ - { - id: '79a35051-7744-49f0-bdfb-388dfe9d7bd3', - username: 'hindawi+auth@thinslices.com', - }, - ], - authors: [ - { - id: '79a35051-7744-49f0-bdfb-388dfe9d7bd3', - email: 'hindawi+auth@thinslices.com', - title: 'mr', - lastName: 'Manuscriptunson', - firstName: 'Author', - affiliation: 'Hindawi', - isSubmitting: true, - isCorresponding: true, - }, - { - id: 'd2c4aac6-af51-4421-98c6-cbbc862160d4', - email: 'hindawi+coauthor@thinslices.com', - lastName: 'Southgate', - firstName: 'Gareth 4thplace', - affiliation: 'UK', - isSubmitting: false, - isCorresponding: false, - }, - ], - created: '2018-07-20T13:16:39.635Z', - version: 1, - metadata: { - type: 'clinical-study', - issue: 'regular-issue', - title: '<p>Harry Kane</p>', - journal: 'hindawi-faraday', - abstract: '<p>Golden boot, golden boy.</p>', - }, - conflicts: { hasConflicts: 'no' }, - submitted: 1532092696032, - collectionId: 'afe691b5-8134-4e5c-b6e3-354a2ed473b5', - declarations: [ - 'has-email', - 'has-manuscript', - 'has-efiles', - 'ok-article-processing', - 'has-orcid', - 'ok-institutional', - ], - fragmentType: 'version', - recommendations: [ - { - id: '3f86ab07-14c8-4151-8185-d83054cb1c93', - userId: '36319eb1-d245-47d1-b010-4fc1b33d0e41', - createdOn: 1532094805409, - updatedOn: 1532094805409, - recommendation: 'publish', - recommendationType: 'editorRecommendation', - }, - ], -} - -const setMetadata = (metadata, jsonTemplate) => { - const titleGroup = { - 'article-title': convert.xml2js(metadata.title, options), - } - set(jsonTemplate, 'article.front.article-meta.title-group', titleGroup) - set( - jsonTemplate, - 'article.front.article-meta.abstract', - convert.xml2js(metadata.abstract, options), - ) - - return jsonTemplate -} - -const setHistory = (submitted, jsonTemplate) => { - const date = new Date(submitted) - const parsedDate = { - date: { - _attributes: { - 'date-type': 'received', - }, - day: { - _text: date.getDay(), - }, - month: { - _text: date.getMonth(), - }, - year: { - _text: date.getFullYear(), - }, - }, - } - set(jsonTemplate, 'article.front.article-meta.history', parsedDate) - - return jsonTemplate -} - -const setFigures = (files, jsonTemplate) => { - const figs = files.supplementary.map((f, i) => ({ - label: { - _text: `Figure ${i + 1}`, - }, - graphic: { - _attributes: { - 'xlink:href': f.name, - 'xmlns:xlink': 'http://www.w3.org/1999/xlink', - }, - }, - })) - - set(jsonTemplate, 'article.body.fig', figs) - - return jsonTemplate -} - -const setContributors = (authors, jsonTemplate) => { - const contrib = authors.map((a, i) => ({ - _attributes: { - 'contrib-type': 'author', - corresp: a.isCorresponding ? 'yes' : 'no', - }, - role: { - _attributes: { - 'content-type': '1', - }, - }, - name: { - surname: { - _text: a.firstName, - }, - 'given-names': { - _text: a.lastName, - }, - prefix: { - _text: a.title || 'Dr.', - }, - }, - email: { - _text: a.email, - }, - xref: { - _attributes: { - 'ref-type': 'aff', - rid: `aff${i + 1}`, - }, - }, - })) - const aff = authors.map((a, i) => ({ - _attributes: { - id: `aff${i + 1}`, - }, - country: { - _text: a.affiliation, - }, - })) - - set(jsonTemplate, 'article.front.article-meta.contrib-group.contrib', contrib) - set(jsonTemplate, 'article.front.article-meta.contrib-group.aff', aff) - - return jsonTemplate -} - -const composeJson = (json = {}, jsonTemplate) => { - const { - authors = [], - files = [], - metadata = { title: 'untitled', abstract: 'no abstract' }, - submitted = new Date(), - } = json - - return { - ...jsonTemplate, - ...setMetadata(metadata, jsonTemplate), - ...setContributors(authors, jsonTemplate), - ...setHistory(submitted, jsonTemplate), - ...setFigures(files, jsonTemplate), - } -} - -const mtsTemplate = mts.getJsonTemplate() -createXMLFile(composeJson(fragment, mtsTemplate)) - -module.exports = { - createXMLFile, - composeJson, -} diff --git a/packages/component-mts-package/src/mts-json-template.js b/packages/component-mts-package/src/mts-json-template.js index 064109ff2..22d50be82 100644 --- a/packages/component-mts-package/src/mts-json-template.js +++ b/packages/component-mts-package/src/mts-json-template.js @@ -1,14 +1,4 @@ -const defaultConfig = { - doctype: 'article SYSTEM "JATS-archivearticle1-mathml3.dtd"', - dtdVersion: '1.1d1', - articleType: 'Research Article', - journalIdPublisher: 'research', - email: 'faraday@hindawi.com', - journalTitle: 'Bioinorganic Chemistry and Applications', - issn: '2474-7394', -} - -const getJsonTemplate = (config = defaultConfig) => ({ +const getJsonTemplate = (config = {}) => ({ _declaration: { _attributes: { version: '1.0', diff --git a/packages/component-mts-package/src/output.xml b/packages/component-mts-package/src/output.xml index 88b2c9043..d57df1a84 100644 --- a/packages/component-mts-package/src/output.xml +++ b/packages/component-mts-package/src/output.xml @@ -6,7 +6,7 @@ <journal-id journal-id-type="publisher">research</journal-id> <journal-id journal-id-type="email">faraday@hindawi.com</journal-id> <journal-title-group> - <journal-title>Faraday Journal</journal-title> + <journal-title>Bioinorganic Chemistry and Applications</journal-title> </journal-title-group> <issn pub-type="ppub">2474-7394</issn> <issn pub-type="epub"></issn> @@ -16,23 +16,13 @@ <article-id pub-id-type="manuscript">FARADAY-D-00-00000</article-id> <article-categories> <subj-group subj-group-type="Article Type"> - <subject>Research Article</subject> - </subj-group> - <subj-group subj-group-type="Category"> - <subject>Information science</subject> - </subj-group> - <subj-group subj-group-type="Classification"> - <subject>Applied sciences and engineering</subject> - </subj-group> - <subj-group subj-group-type="Classification"> - <subject>Scientific community</subject> + <subject>clinical-study</subject> </subj-group> </article-categories> <title-group> <article-title> <p>Harry Kane</p> </article-title> - <alt-title alt-title-type="running-head">let's hope this works</alt-title> </title-group> <contrib-group> <contrib contrib-type="author" corresp="yes"> @@ -50,7 +40,7 @@ <name> <surname>Gareth 4thplace</surname> <given-names>Southgate</given-names> - <prefix>Dr</prefix> + <prefix>Dr.</prefix> </name> <email>hindawi+coauthor@thinslices.com</email> <xref ref-type="aff" rid="aff2"></xref> @@ -72,25 +62,10 @@ <abstract> <p>Golden boot, golden boy.</p> </abstract> - <kwd-group> - <kwd>manuscript</kwd> - <kwd>submissions</kwd> - <kwd>ftp site</kwd> - </kwd-group> <funding-group></funding-group> <counts> <fig-count count="0"></fig-count> </counts> - <custom-meta-group> - <custom-meta> - <meta-name>Black and White Image Count</meta-name> - <meta-value>0</meta-value> - </custom-meta> - <custom-meta> - <meta-name>Color Image Count</meta-name> - <meta-value>0</meta-value> - </custom-meta> - </custom-meta-group> </article-meta> </front> <body> diff --git a/packages/component-mts-package/src/template.json b/packages/component-mts-package/src/template.json deleted file mode 100644 index 21ccc5f10..000000000 --- a/packages/component-mts-package/src/template.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "_declaration": { - "_attributes": { - "version": "1.0", - "encoding": "utf-8" - } - }, - "_doctype": "article SYSTEM \"JATS-archivearticle1-mathml3.dtd\"", - "article": { - "_attributes": { - "dtd-version": "1.1d1", - "article-type": "Research Article" - }, - "front": { - "journal-meta": { - "journal-id": [ - { - "_attributes": { - "journal-id-type": "publisher" - }, - "_text": "research" - }, - { - "_attributes": { - "journal-id-type": "email" - }, - "_text": "trashjo@ariessys.com" - } - ], - "journal-title-group": { - "journal-title": { - "_text": "Research" - } - }, - "issn": [ - { - "_attributes": { - "pub-type": "ppub" - }, - "_text": "0000-000Y" - }, - { - "_attributes": { - "pub-type": "epub" - } - } - ] - }, - "article-meta": { - "article-id": [ - { - "_attributes": { - "pub-id-type": "publisher-id" - }, - "_text": "RESEARCH-D-18-00005" - }, - { - "_attributes": { - "pub-id-type": "manuscript" - }, - "_text": "RESEARCH-D-18-00005" - } - ], - "article-categories": { - "subj-group": [ - { - "_attributes": { - "subj-group-type": "Article Type" - }, - "subject": { - "_text": "Research Article" - } - }, - { - "_attributes": { - "subj-group-type": "Category" - }, - "subject": { - "_text": "Information science" - } - }, - { - "_attributes": { - "subj-group-type": "Classification" - }, - "subject": { - "_text": "Applied sciences and engineering" - } - }, - { - "_attributes": { - "subj-group-type": "Classification" - }, - "subject": { - "_text": "Scientific community" - } - } - ] - }, - "title-group": { - "article-title": { - "_text": "January 24 sample article with new email trigger in place" - }, - "alt-title": { - "_attributes": { - "alt-title-type": "running-head" - }, - "_text": "let's hope this works" - } - }, - "contrib-group": { - "contrib": { - "_attributes": { - "contrib-type": "author", - "corresp": "yes" - }, - "role": { - "_attributes": { - "content-type": "1" - } - }, - "name": { - "surname": { - "_text": "Heckner" - }, - "given-names": { - "_text": "Hannah" - }, - "prefix": { - "_text": "Ms." - } - }, - "email": { - "_text": "hheckner@aaas.org" - }, - "xref": { - "_attributes": { - "ref-type": "aff", - "rid": "aff1" - } - } - }, - "aff": { - "_attributes": { - "id": "aff1" - }, - "country": { - "_text": "UNITED STATES" - } - } - }, - "history": { - "date": { - "_attributes": { - "date-type": "received" - }, - "day": { - "_text": "24" - }, - "month": { - "_text": "01" - }, - "year": { - "_text": "2018" - } - } - }, - "abstract": { - "p": { - "_text": "Abstract\nThis article explains and illustrates the use of LATEX in preparing manuscripts for submission to the American Journal of Physics (AJP). While it is not a comprehensive reference, we hope it will suffice for the needs of most AJP authors." - } - }, - "kwd-group": { - "kwd": [ - { - "_text": "manuscript" - }, - { - "_text": "submissions" - }, - { - "_text": "ftp site" - } - ] - }, - "funding-group": {}, - "counts": { - "fig-count": { - "_attributes": { - "count": "0" - } - } - }, - "custom-meta-group": { - "custom-meta": [ - { - "meta-name": { - "_text": "Black and White Image Count" - }, - "meta-value": { - "_text": "0" - } - }, - { - "meta-name": { - "_text": "Color Image Count" - }, - "meta-value": { - "_text": "0" - } - } - ] - } - } - }, - "body": { - "fig": [ - { - "label": { - "_text": "Figure 1" - }, - "graphic": { - "_attributes": { - "xlink:href": "GasBulbData.eps", - "xmlns:xlink": "http://www.w3.org/1999/xlink" - } - } - }, - { - "label": { - "_text": "Figure 2" - }, - "graphic": { - "_attributes": { - "xlink:href": "ThreeSunsets.jpg", - "xmlns:xlink": "http://www.w3.org/1999/xlink" - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/packages/component-mts-package/tests/MTS.test.js b/packages/component-mts-package/tests/MTS.test.js new file mode 100644 index 000000000..0dc22cada --- /dev/null +++ b/packages/component-mts-package/tests/MTS.test.js @@ -0,0 +1,40 @@ +process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' +process.env.SUPPRESS_NO_CONFIG_WARNING = true + +const MTSService = require('../src/MTS') +const mocks = require('./mocks') + +jest.mock('xml-js', () => ({ + json2xml: jest.fn(), + xml2js: jest.fn(), +})) +jest.mock('fs', () => ({ + json2xml: jest.fn(), + xml2js: jest.fn(), +})) + +describe('MTS integration', () => { + let MTS + + beforeEach(() => { + MTS = new MTSService(mocks.config.defaultConfig) + }) + + it('should be instantiated', () => { + const result = MTS + expect(result).toBeDefined() + }) + + it('should return basic json for XML parsing', () => { + const result = MTS.composeJson({}) + expect(result).toHaveProperty('article') + }) + + it('should contain configured journal name ', () => { + const result = MTS.composeJson(mocks.fragment) + expect(result).toHaveProperty( + 'article.front.journal-meta.journal-title-group.journal-title._text', + 'Bioinorganic Chemistry and Applications', + ) + }) +}) diff --git a/packages/component-mts-package/tests/mocks.js b/packages/component-mts-package/tests/mocks.js new file mode 100644 index 000000000..6fea2902d --- /dev/null +++ b/packages/component-mts-package/tests/mocks.js @@ -0,0 +1,89 @@ +const config = require('../config/default') + +const fragment = { + id: '57c7560b-6c1c-480d-a207-cb388d60a213', + type: 'fragment', + files: { + coverLetter: [], + manuscripts: [ + { + id: + '57c7560b-6c1c-480d-a207-cb388d60a213/170ef7b5-bdfd-4637-908d-a693b8c07928', + name: 'Revolut-EUR-Statement-Jan 8, 2018.pdf', + size: 63347, + }, + ], + supplementary: [ + { + id: + '57c7560b-6c1c-480d-a207-cb388d60a213/170ef7b5-bdfd-4637-908d-a693b8c07928', + name: 'SUP__Revolut-EUR-Statement-Jan 8, 2018.pdf', + size: 63347, + }, + ], + responseToReviewers: [], + }, + owners: [ + { + id: '79a35051-7744-49f0-bdfb-388dfe9d7bd3', + username: 'hindawi+auth@thinslices.com', + }, + ], + authors: [ + { + id: '79a35051-7744-49f0-bdfb-388dfe9d7bd3', + email: 'hindawi+auth@thinslices.com', + title: 'mr', + lastName: 'Manuscriptunson', + firstName: 'Author', + affiliation: 'Hindawi', + isSubmitting: true, + isCorresponding: true, + }, + { + id: 'd2c4aac6-af51-4421-98c6-cbbc862160d4', + email: 'hindawi+coauthor@thinslices.com', + lastName: 'Southgate', + firstName: 'Gareth 4thplace', + affiliation: 'UK', + isSubmitting: false, + isCorresponding: false, + }, + ], + created: '2018-07-20T13:16:39.635Z', + version: 1, + metadata: { + type: 'clinical-study', + issue: 'regular-issue', + title: '<p>Harry Kane</p>', + journal: 'hindawi-faraday', + abstract: '<p>Golden boot, golden boy.</p>', + }, + conflicts: { hasConflicts: 'no' }, + submitted: 1532092696032, + collectionId: 'afe691b5-8134-4e5c-b6e3-354a2ed473b5', + declarations: [ + 'has-email', + 'has-manuscript', + 'has-efiles', + 'ok-article-processing', + 'has-orcid', + 'ok-institutional', + ], + fragmentType: 'version', + recommendations: [ + { + id: '3f86ab07-14c8-4151-8185-d83054cb1c93', + userId: '36319eb1-d245-47d1-b010-4fc1b33d0e41', + createdOn: 1532094805409, + updatedOn: 1532094805409, + recommendation: 'publish', + recommendationType: 'editorRecommendation', + }, + ], +} + +module.exports = { + fragment, + config, +} diff --git a/packages/component-mts-package/src/sample.json b/packages/component-mts-package/tests/sample.json similarity index 100% rename from packages/component-mts-package/src/sample.json rename to packages/component-mts-package/tests/sample.json diff --git a/packages/component-mts-package/src/sample.xml b/packages/component-mts-package/tests/sample.xml similarity index 100% rename from packages/component-mts-package/src/sample.xml rename to packages/component-mts-package/tests/sample.xml -- GitLab