Skip to content

Commit

Permalink
[MNT] Renamed examples files (#608)
Browse files Browse the repository at this point in the history
* Renamed example files

* Updated `validate-output-example_synthetic-e2etest`

* Formatted example json files

* Reformatted json example files
  • Loading branch information
rmanaem authored Nov 6, 2023
1 parent b8e48bf commit 04583bc
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 158 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe("to annotate an assessment ", () => {

/* ==== Generated with Cypress Studio ==== */
cy.get('[data-cy="data-dictionary-selector"] > .row > form > .file-selector-button').click();
cy.get('[data-cy="data-dictionary-selector"] > .row > form > .file-selector-button > input').selectFile('cypress/fixtures/examples/good/example_synthetic.json', { force: true });
cy.get('[data-cy="data-dictionary-selector"] > .row > form > .file-selector-button > input').selectFile('cypress/fixtures/examples/good/example_synthetic_participants.json', { force: true });
/* ==== End Cypress Studio ==== */
cy.get("[data-cy='button-nextpage']").click();

Expand Down Expand Up @@ -105,7 +105,7 @@ describe("to annotate an assessment ", () => {
cy.task("downloads", "cypress/downloads").then(folderStateAfter => {
cy.readFile('cypress/downloads/' + folderStateAfter[folderStateAfter.length - 1]).then((outputContent) => {

const expectedOutput = require('../../fixtures/examples/good/example_synthetic_expected_output.json');
const expectedOutput = require('../../fixtures/examples/good/example_synthetic.json');
expect(outputContent).to.deep.equal(expectedOutput);
});
});
Expand Down
147 changes: 122 additions & 25 deletions cypress/fixtures/examples/good/example_synthetic.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,131 @@
{
"participant_id":{
"Description":"A participant ID"
"participant_id": {
"Description": "A participant ID",
"Annotations": {
"IsAbout": {
"TermURL": "nb:ParticipantID",
"Label": "Subject Unique Identifier"
},
"Identifies": "participant"
}
},
"session_id":{
"Description":"A session ID"
"session_id": {
"Description": "A session ID"
},
"pheno_age":{
"Description":"Age of the participant"
"pheno_age": {
"Description": "Age of the participant",
"Annotations": {
"IsAbout": {
"TermURL": "nb:Age",
"Label": "Age"
},
"Transformation": {
"TermURL": "nb:FromEuro",
"Label": "european decimal value"
},
"MissingValues": [
"NA"
]
}
},
"pheno_sex":{
"Description":"Sex variable",
"Levels":{
"M":"Male",
"F":"Female"
}
"pheno_sex": {
"Description": "Sex variable",
"Levels": {
"M": "Male",
"F": "Female"
},
"Annotations": {
"IsAbout": {
"TermURL": "nb:Sex",
"Label": "Sex"
},
"Levels": {
"M": {
"TermURL": "snomed:248153007",
"Label": "Male"
},
"F": {
"TermURL": "snomed:248152002",
"Label": "Female"
}
},
"MissingValues": [
"missing"
]
}
},
"pheno_group":{
"Description":"Group variable",
"Levels":{
"PAT":"Patient",
"CTRL":"Control subject"
}
"pheno_group": {
"Description": "Group variable",
"Levels": {
"PAT": "Patient",
"CTRL": "Control subject"
},
"Annotations": {
"IsAbout": {
"TermURL": "nb:Diagnosis",
"Label": "Diagnosis"
},
"Levels": {
"PAT": {
"TermURL": "snomed:406506008",
"Label": "Attention deficit hyperactivity disorder"
},
"CTRL": {
"TermURL": "ncit:C94342",
"Label": "Healthy Control"
}
},
"MissingValues": [
"NA"
]
}
},
"tool1_item1":{
"Description":"item 1 scores for tool1"
"tool1_item1": {
"Description": "item 1 scores for tool1",
"Annotations": {
"IsAbout": {
"TermURL": "nb:Assessment",
"Label": "Assessment tool"
},
"IsPartOf": {
"TermURL": "cogatlas:trm_57964b8a66aed",
"Label": "Montreal Cognitive Assessment"
},
"MissingValues": [
"missing"
]
}
},
"tool1_item2":{
"Description":"item 2 scores for tool1"
"tool1_item2": {
"Description": "item 2 scores for tool1",
"Annotations": {
"IsAbout": {
"TermURL": "nb:Assessment",
"Label": "Assessment tool"
},
"IsPartOf": {
"TermURL": "cogatlas:trm_57964b8a66aed",
"Label": "Montreal Cognitive Assessment"
},
"MissingValues": [
"missing"
]
}
},
"tool2_item1":{
"Description":"item 1 scores for tool2"
"tool2_item1": {
"Description": "item 1 scores for tool2",
"Annotations": {
"IsAbout": {
"TermURL": "nb:Assessment",
"Label": "Assessment tool"
},
"IsPartOf": {
"TermURL": "cogatlas:tsk_4a57abb949ece",
"Label": "Unified Parkinson's Disease Rating Scale"
},
"MissingValues": [
"not completed"
]
}
}
}
}
131 changes: 0 additions & 131 deletions cypress/fixtures/examples/good/example_synthetic_expected_output.json

This file was deleted.

34 changes: 34 additions & 0 deletions cypress/fixtures/examples/good/example_synthetic_participants.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"participant_id": {
"Description": "A participant ID"
},
"session_id": {
"Description": "A session ID"
},
"pheno_age": {
"Description": "Age of the participant"
},
"pheno_sex": {
"Description": "Sex variable",
"Levels": {
"M": "Male",
"F": "Female"
}
},
"pheno_group": {
"Description": "Group variable",
"Levels": {
"PAT": "Patient",
"CTRL": "Control subject"
}
},
"tool1_item1": {
"Description": "item 1 scores for tool1"
},
"tool1_item2": {
"Description": "item 2 scores for tool1"
},
"tool2_item1": {
"Description": "item 1 scores for tool2"
}
}

0 comments on commit 04583bc

Please sign in to comment.