Skip to content

Commit

Permalink
outsource test_traditions object to a shared variables file
Browse files Browse the repository at this point in the history
  • Loading branch information
schiwaa committed Oct 31, 2023
1 parent 59c7d24 commit 3713e63
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 384 deletions.
139 changes: 139 additions & 0 deletions frontend-e2e/cypress/e2e/_shared_variables.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/* variables used in several .cy.js files
// TODO? move to a utilities directory
*/

// TODO: check with init_test_data.sh
const test_traditions = [
{ title : "Notre besoin",
filetype : "stemmaweb",
owner : "[email protected]",
language : "French",
access : "Public",
sectionscount : 1,
sections : [
{ name: 'DEFAULT',
language : 'French'
},
],
// tradition_id : "", // random
direction : "Left to Right", // implied (language : French)
witnesses : ["A", "B", "C", "D", "F", "J", "L", "M", "S", "T1", "T2", "U", "V"], // besoin_stemma.json, besoin_stemma_2.json
stemmata : [
"Stemweb stemma", // identifier in besoin_stemma.json"
"Stemweb stemma duplicate" // identifier in besoin_stemma_2.json
]
},
{ title : "Florilegium \"Coislinianum B\"",
filetype : "csv",
owner : "[email protected]",
language : "Greek",
access : "Private",
sectionscount : 3, // init_test_data.sh sections w x y.
sections : [
{ name: 'section \'w\'',
language : 'Greek'
},
{ name: 'section \'x\'',
language : 'Greek'
},
{ name: 'section \'y\'',
language : 'Greek'
},
],
// tradition_id : "",
direction : "Left to Right",
witnesses : ["A", "B", "C", "D", "E", "F", "G", "H", "K", "P", "Q", "S", "T"], // from the dashboard, looks ok from the florilegium csv files
stemmata : [
"stemma of Tomas" // identifier in florilegium_stemma.json
]
},
{ title : "Legend's fragment", // name given in init_test_data.sh, full title in legendfrag.xml: "Legend of Bishop Henry",
filetype : "stemmaweb",
owner : "[email protected]",
language : "Latin", // in legendfrag.xml (not Armenian, ok)
access : "Private",
sectionscount : 2,
sections : [
{ name: 'DEFAULT',
language : 'Latin'
},
{ name: 'section 2',
language : 'Latin'
},
],
// tradition_id : "",
direction : "Left to Right",
witnesses : ["A", "Ab", "B", "BA", "BL", "BLu", "BS", "BSt", "BU", "Bc", "C", "Dr", "Ef", "F", "G", "Gh", "H", "Ho", "JG", "K", "L", "Li", "M", "MN", "N", "O", "P", "Q", "S", "Sk", "St", "T", "U", "V", "Vg", "X", "Y"],
stemmata : []
},

{ title : "Ժամանակագրութիւն checked", // just milestone "Matthew 401"; title taken from the graphml/zip file
filetype : "graphml",
owner : "[email protected]",
language : "Armenian",
access : "Private",
sectionscount : 1,
sections : [
{ name: 'milestone-401',
language : 'Armenian'
},
],
// tradition_id : "",
direction : "Left to Right",
witnesses : ["A", "B", "Bz430", "Bz644", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M1775", "M2855", "M2899", "M3380", "M6605", "M6686", "M8232", "O", "V", "W", "W243", "W246", "X", "Y", "Z"],
stemmata : [
"First attempt", // Stemma is included in zip data
"RHM 1641561271_0" // Stemma is included in zip data
]
},
{ title : "John verse",
filetype : "stemmaweb",
owner : "[email protected]",
language : "Greek",
access : "Public",
sectionscount : 1,
sections : [
{ name: 'DEFAULT',
language : 'Greek'
},
],
// tradition_id : "",
direction : "Left to Right",
witnesses : ["P60", "P66", "base", "w1", "w11", "w13", "w17", "w19", "w2", "w21", "w211", "w22", "w28", "w290", "w3", "w30", "w32", "w33", "w34", "w36", "w37", "w38", "w39", "w41", "w44", "w45", "w54", "w7"],
stemmata : []
},
{ title : "Arabic snippet",
filetype : "csv",
owner : "[email protected]",
language : "Arabic",
access : "Private",
sectionscount : 1,
sections : [
{ name: 'DEFAULT',
language : 'Arabic'
},
],
// tradition_id : "",
direction : "Right to Left", // implied (language : Arabic)
witnesses : ["A", "B"], // arabic_snippet.csv
stemmata : []
},

{ title : "Verbum uncorrected",
filetype : "stemmaweb",
owner : "[email protected]",
language : "Latin",
access : "Private",
sectionscount : 1,
sections : [
{ name: 'DEFAULT',
language : 'Latin'
},
],
// tradition_id : "",
direction : "Left to Right",
witnesses : ["Ba96", "Er16", "Go325", "Gr314", "Kf133", "Kr185", "Kr299", "Mü11475", "Mü22405", "Mü28315", "MüU151", "Sg524", "Wi3818"], // looks good
stemmata : []
},
];
export {test_traditions};
99 changes: 1 addition & 98 deletions frontend-e2e/cypress/e2e/guests_privileges.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,104 +47,7 @@ [email protected] (pw AdminPass) has one tradition
Verbum uncorrected, private
*/

// checked against init_test_data.sh
// TODO: check sectionscount
const test_traditions = [
{ title : "Notre besoin",
filetype : "stemmaweb",
owner : "[email protected]",
language : "French",
access : "Public",
sectionscount : 1,

// tradition_id : "", // random
direction : "Left to Right", // implied (language : French)
witnesses : ["A", "B", "C", "D", "F", "J", "L", "M", "S", "T1", "T2", "U", "V"], // besoin_stemma.json, besoin_stemma_2.json
stemmata : [
"Stemweb stemma", // identifier in besoin_stemma.json"
"Stemweb stemma duplicate" // identifier in besoin_stemma_2.json
]
},
{ title : "Florilegium \"Coislinianum B\"",
filetype : "csv",
owner : "[email protected]",
language : "Greek",
access : "Private",
sectionscount : 3, // init_test_data.sh sections w x y.

// tradition_id : "",
direction : "Left to Right",
witnesses : ["A", "B", "C", "D", "E", "F", "G", "H", "K", "P", "Q", "S", "T"], // from the dashboard, looks ok from the florilegium csv files
stemmata : [
"stemma of Tomas" // identifier in florilegium_stemma.json
]
},
{ title : "Legend's fragment", // name given in init_test_data.sh, full title in legendfrag.xml: "Legend of Bishop Henry",
filetype : "stemmaweb",
owner : "[email protected]",
language : "Latin", // in legendfrag.xml (not Armenian, ok)
access : "Private",
sectionscount : 2,

// tradition_id : "",
direction : "Left to Right",
witnesses : ["A", "Ab", "B", "BA", "BL", "BLu", "BS", "BSt", "BU", "Bc", "C", "Dr", "Ef", "F", "G", "Gh", "H", "Ho", "JG", "K", "L", "Li", "M", "MN", "N", "O", "P", "Q", "S", "Sk", "St", "T", "U", "V", "Vg", "X", "Y"],
stemmata : []
},

{ title : "Ժամանակագրութիւն checked", // just milestone "Matthew 401"; title taken from the graphml/zip file
filetype : "graphml",
owner : "[email protected]",
language : "Armenian",
access : "Private",
sectionscount : 1,

// tradition_id : "",
direction : "Left to Right",
witnesses : ["A", "B", "Bz430", "Bz644", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M1775", "M2855", "M2899", "M3380", "M6605", "M6686", "M8232", "O", "V", "W", "W243", "W246", "X", "Y", "Z"],
stemmata : [
"First attempt", // Stemma is included in zip data
"RHM 1641561271_0" // Stemma is included in zip data
]
},
{ title : "John verse",
filetype : "stemmaweb",
owner : "[email protected]",
language : "Greek",
access : "Public",
sectionscount : 1,

// tradition_id : "",
direction : "Left to Right",
witnesses : ["P60", "P66", "base", "w1", "w11", "w13", "w17", "w19", "w2", "w21", "w211", "w22", "w28", "w290", "w3", "w30", "w32", "w33", "w34", "w36", "w37", "w38", "w39", "w41", "w44", "w45", "w54", "w7"],
stemmata : []
},
{ title : "Arabic snippet",
filetype : "csv",
owner : "[email protected]",
language : "Arabic",
access : "Private",
sectionscount : 1,

// tradition_id : "",
direction : "Right to Left", // implied (language : Arabic)
witnesses : ["A", "B"], // arabic_snippet.csv
stemmata : []
},

{ title : "Verbum uncorrected",
filetype : "stemmaweb",
owner : "[email protected]",
language : "Latin",
access : "Private",
sectionscount : 1,

// tradition_id : "",
direction : "Left to Right",
witnesses : ["Ba96", "Er16", "Go325", "Gr314", "Kf133", "Kr185", "Kr299", "Mü11475", "Mü22405", "Mü28315", "MüU151", "Sg524", "Wi3818"], // looks good
stemmata : []
},
];
import { test_traditions } from "./_shared_variables";

beforeEach(() => {
cy.visit(`${Cypress.env('CY_STEMMAWEB_FRONTEND_URL')}/`);
Expand Down
Loading

0 comments on commit 3713e63

Please sign in to comment.