Skip to content

Commit

Permalink
relax requirement for sociogram background
Browse files Browse the repository at this point in the history
  • Loading branch information
jthrilly committed Nov 2, 2023
1 parent 01b9159 commit 40f3327
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 36 deletions.
9 changes: 5 additions & 4 deletions src/__tests__/test-protocols.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ const extractAndValidate = async (protocolPath: string) => {
const protocol = await getProtocolJsonAsObject(zip);

// Hack because somme test protocols don't specify schema versions correctly
let schemaVersion;
let schemaVersion = undefined;
if (!protocol.schemaVersion || protocol.schemaVersion === "1.0.0") {
console.log('schemaVersion is missing or "1.0.0" for', protocolPath);
schemaVersion = 1;
} else {
schemaVersion = protocol.schemaVersion;
}

// Validating protocol...
Expand Down Expand Up @@ -60,7 +59,9 @@ const extractAndValidate = async (protocolPath: string) => {
};

const PROTOCOL_PATH = "../../test-protocols";
const protocols = readdirSync(join(__dirname, PROTOCOL_PATH));
const protocols = readdirSync(join(__dirname, PROTOCOL_PATH)).filter((file) =>
file.endsWith(".netcanvas"),
);

describe("Test protocols", () => {
it.each(protocols)("%s", async (protocol) => {
Expand Down
4 changes: 0 additions & 4 deletions src/schemas/1.json
Original file line number Diff line number Diff line change
Expand Up @@ -505,10 +505,6 @@
"type": "boolean"
}
},
"oneOf": [
{ "required": ["concentricCircles"] },
{ "required": ["image"] }
],
"title": "Background"
},
"SortOrder": {
Expand Down
4 changes: 0 additions & 4 deletions src/schemas/2.json
Original file line number Diff line number Diff line change
Expand Up @@ -512,10 +512,6 @@
"type": "boolean"
}
},
"oneOf": [
{ "required": ["concentricCircles"] },
{ "required": ["image"] }
],
"title": "Background"
},
"SortOrder": {
Expand Down
4 changes: 0 additions & 4 deletions src/schemas/3.json
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,6 @@
"type": "boolean"
}
},
"oneOf": [
{ "required": ["concentricCircles"] },
{ "required": ["image"] }
],
"title": "Background"
},
"SortOrder": {
Expand Down
4 changes: 0 additions & 4 deletions src/schemas/4.json
Original file line number Diff line number Diff line change
Expand Up @@ -536,10 +536,6 @@
"type": "boolean"
}
},
"oneOf": [
{ "required": ["concentricCircles"] },
{ "required": ["image"] }
],
"title": "Background"
},
"SortOrder": {
Expand Down
4 changes: 0 additions & 4 deletions src/schemas/5.json
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,6 @@
"type": "boolean"
}
},
"oneOf": [
{ "required": ["concentricCircles"] },
{ "required": ["image"] }
],
"title": "Background"
},
"SortOrder": {
Expand Down
4 changes: 0 additions & 4 deletions src/schemas/6.json
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,6 @@
"type": "boolean"
}
},
"oneOf": [
{ "required": ["concentricCircles"] },
{ "required": ["image"] }
],
"title": "Background"
},
"AutomaticLayout": {
Expand Down
4 changes: 0 additions & 4 deletions src/schemas/7.json
Original file line number Diff line number Diff line change
Expand Up @@ -570,10 +570,6 @@
"type": "boolean"
}
},
"oneOf": [
{ "required": ["concentricCircles"] },
{ "required": ["image"] }
],
"title": "Background"
},
"AutomaticLayout": {
Expand Down
4 changes: 0 additions & 4 deletions src/schemas/8.json
Original file line number Diff line number Diff line change
Expand Up @@ -574,10 +574,6 @@
"type": "boolean"
}
},
"oneOf": [
{ "required": ["concentricCircles"] },
{ "required": ["image"] }
],
"title": "Background"
},
"AutomaticLayout": {
Expand Down

0 comments on commit 40f3327

Please sign in to comment.