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

Add Selenium tests to Klados #343

Draft
wants to merge 39 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5f94c33
Removed ability of users to edit the specifierLabel.
gaurav Aug 28, 2024
14211ec
Removed apomorphy as a specifier type.
gaurav Aug 28, 2024
1f47bc8
Simplified Specifier.
gaurav Aug 28, 2024
9466993
Added some documentation, made some minor improvements.
gaurav Sep 22, 2024
a0cdb06
Renamed "Verbatim Specifier" to "Specifier label".
gaurav Sep 22, 2024
b3a6e0a
Added a UUID as an example.
gaurav Sep 22, 2024
2246142
Added a better explaining occurrence ID.
gaurav Sep 22, 2024
4598f69
Calculate verbatim label for Taxon and Specimen.
gaurav Sep 22, 2024
d0ab526
Fixed labels.
gaurav Sep 22, 2024
e8c35f1
Simplified some code from wrappedTaxonConcept.
gaurav Sep 22, 2024
0e708f9
Merge branch 'fix-references-to-defaultNomenclaturalCodeURI' into sim…
gaurav Sep 23, 2024
38a11be
Updated and hopefully cleaned up some of this code.
gaurav Sep 23, 2024
94eb6ce
Some tweaks and documentation to taxon name fields.
gaurav Sep 25, 2024
84cfb3a
Got rid of some computed values that are unnecessary.
gaurav Sep 25, 2024
fed6739
Added external reference to specifierLabel.
gaurav Sep 25, 2024
c9e32be
Improve documentation.
gaurav Sep 25, 2024
dc41f81
Top-level documentation on the two key methods.
gaurav Sep 25, 2024
4e64360
Cleaned up and improved loadSpecifier().
gaurav Sep 25, 2024
def7d79
Added watches to make sure that the specifier updates properly.
gaurav Sep 25, 2024
3b87f5b
Removed redundant CSS command.
gaurav Nov 4, 2024
6079db1
Make sure the Specifier component is reset in between loads.
gaurav Nov 4, 2024
33aa5e0
Some (possibly useless) tweaks.
gaurav Dec 18, 2024
b105a43
Removed unnecessary index.
gaurav Jan 13, 2025
112ed15
We need to update phyloref type when the specifier composition changes.
gaurav Jan 13, 2025
5f6ae48
Fixed the self-triggering event.
gaurav Jan 13, 2025
0d4986d
First stab at adding Selenium tests for Klados.
gaurav Jan 13, 2025
87fc26a
Merge branch 'simplify-specifier' into add-selenium-tests
gaurav Jan 15, 2025
1ef2843
Added selenium side runner and geckodriver.
gaurav Jan 15, 2025
ef18913
Added selenium to the scripts.
gaurav Jan 15, 2025
c435961
Removed unnecessary mouse events.
gaurav Jan 15, 2025
2257484
Added editing tests.
gaurav Jan 15, 2025
5e730f9
Added a Basic Example.
gaurav Jan 15, 2025
18a76c2
Renamed getPhylorefTypeAsString() to make things clearer.
gaurav Jan 15, 2025
a34dc5f
Added an unmounted() handler to save changes before unmounting.
gaurav Jan 15, 2025
d892ecb
Merge branch 'simplify-specifier' into add-selenium-tests
gaurav Jan 15, 2025
58ecccb
Allow empty taxa and specimens during a save.
gaurav Jan 15, 2025
0466aa6
Merge branch 'simplify-specifier' into add-selenium-tests
gaurav Jan 15, 2025
9c726f9
Added Selenium tests for label/type changes.
gaurav Jan 15, 2025
fcd8887
Removed some unnecessary commands or something? Confusing.
gaurav Jan 15, 2025
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
4,069 changes: 4,039 additions & 30 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview --port 4173",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
"selenium": "selenium-side-runner -c 'browserName=firefox'"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -41,7 +42,9 @@
"@vue/eslint-config-prettier": "^7.0.0",
"eslint": "^8.5.0",
"eslint-plugin-vue": "^9.0.0",
"geckodriver": "^5.0.0",
"prettier": "^2.5.1",
"selenium-side-runner": "^4.0.13",
"terser": "^5.14.2",
"vite": "^3.0.2"
}
Expand Down
43 changes: 43 additions & 0 deletions public/examples/BasicExample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"phylorefs": [
{
"label": "Mammalia",
"internalSpecifiers": [
{
"@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept",
"hasName": {
"@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName",
"label": "Homo sapiens",
"nameComplete": "Homo sapiens",
"genusPart": "Homo",
"specificEpithet": "sapiens",
"nomenclaturalCode": "http://rs.tdwg.org/ontology/voc/TaxonName#ICZN"
}
}
],
"phylorefType": "phyloref:PhyloreferenceUsingMaximumClade",
"externalSpecifiers": [
{
"@type": "http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept",
"hasName": {
"@type": "http://rs.tdwg.org/ontology/voc/TaxonName#TaxonName",
"label": "Enteroctopus dofleini",
"nameComplete": "Enteroctopus dofleini",
"genusPart": "Enteroctopus",
"specificEpithet": "dofleini",
"nomenclaturalCode": "http://rs.tdwg.org/ontology/voc/TaxonName#ICZN"
}
}
]
}
],
"phylogenies": [
{
"newick": "((Homo_sapiens:1,Mus_musculus:1)Test:1,Enteroctopus_dofleini:1):0;"
}
],
"curator": "Gaurav Vaidya",
"curatorEmail": "[email protected]",
"curatorORCID": "0000-0003-0587-0454",
"defaultNomenclaturalCodeIRI": "http://rs.tdwg.org/ontology/voc/TaxonName#ICZN"
}
2 changes: 1 addition & 1 deletion src/components/phyloref/PhylorefView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ export default {
},
computedPhylorefType() {
// Return the type of phyloreference based on internal/external specifier structure.
return this.$store.getters.getPhylorefType(this.selectedPhyloref);
return this.$store.getters.getPhylorefTypeDescription(this.selectedPhyloref);
},
phylorefURI() {
// Get the base URI of this phyloreference.
Expand Down
4 changes: 2 additions & 2 deletions src/components/phyx/PhyxView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
{{ getPhylorefLabel(phyloref) }}
</a>
</td>
<td>{{ $store.getters.getPhylorefType(phyloref) }}</td>
<td>{{ $store.getters.getPhylorefTypeDescription(phyloref) }}</td>
<td>{{ (phyloref.internalSpecifiers || []).length }}</td>
<td>{{ (phyloref.externalSpecifiers || []).length }}</td>
<td v-for="(phylogeny, phylogenyIndex) of phylogenies">
Expand Down Expand Up @@ -498,7 +498,7 @@ export default {
return [
this.$store.getters.getPhylorefId(phyloref),
wrappedPhyloref.label,
this.$store.getters.getPhylorefType(phyloref),
this.$store.getters.getPhylorefTypeDescription(phyloref),
// Write out the clade definition.
phyloref.definition || "",
// Write out the internal specifier labels
Expand Down
Loading