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

experiment with dom builder approach to XML generation #204

Draft
wants to merge 9 commits into
base: next
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"WillLuke.nextjs.addTypesOnSave": true,
"WillLuke.nextjs.hasPrompted": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
"source.organizeImports": "always",
"source.fixAll": "always",
}
}
2 changes: 1 addition & 1 deletion actions/interviews.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const exportSessions = async (
.then(insertEgoIntoSessionNetworks)
.then(groupByProtocolProperty)
.then(resequenceIds)
.then(generateOutputFiles(formattedProtocols, exportOptions))
.then(generateOutputFiles(formattedProtocols, exportOptions)) // Contains partitionByType
.then(archive)
.then(uploadZipToUploadThing);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,27 +174,4 @@ describe('buildGraphML', () => {
'mock-uuid-5': 'node',
});
});

describe('with directed edge option', () => {
beforeEach(() => {
const processedNetworks = processMockNetworks(
[mockNetwork, mockNetwork2],
false,
);
const protocolNetwork = processedNetworks['protocol-uid-1'][0];

xml = buildXML(protocolNetwork, codebook, {
...exportOptions,
globalOptions: {
useDirectedEdges: true,
},
});
});

it('specifies directed edges', () => {
expect(
xml.getElementsByTagName('graph')[0].getAttribute('edgedefault'),
).toEqual('directed');
});
});
});
Loading