Skip to content

Commit

Permalink
Add new vocab for testing hierarchy and remove changes to test vocab
Browse files Browse the repository at this point in the history
  • Loading branch information
UnniKohonen committed Oct 9, 2024
1 parent 4ad6e04 commit a9f4d5b
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 12 deletions.
7 changes: 3 additions & 4 deletions tests/cypress/template/vocab-search.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@ describe('Vocabulary search page', () => {
cy.get('div.search-result > ul > li > span > i.property-hover.fa-solid.fa-arrows-to-circle')

//Check that there is correct amount of different properties for the search result
cy.get('div.search-result > ul > li').should('have.length', 4)
cy.get('div.search-result > ul > li').should('have.length', 3)

//Check the order of search result properties
cy.get('div.search-result > ul').within(() => {
cy.get('li').eq(0).invoke('text').should('contain', 'Fish')
cy.get('li').eq(1).invoke('text').should('contain', 'Black sea bass')
cy.get('li').eq(2).invoke('text').should('contain', 'Test class')
cy.get('li').eq(3).invoke('text').should('contain', 'http://www.skosmos.skos/test/ta116')
cy.get('li').eq(1).invoke('text').should('contain', 'Test class')
cy.get('li').eq(2).invoke('text').should('contain', 'http://www.skosmos.skos/test/ta116')
})

})
Expand Down
180 changes: 180 additions & 0 deletions tests/test-vocab-data/test-hierarchy.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dc11: <http://purl.org/dc/elements/1.1/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix test: <http://www.skosmos.skos/test-hierarchy/> .
@prefix meta: <http://www.skosmos.skos/test-meta/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix skosmos: <http://www.skosmos.skos/> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix mads: <http://www.loc.gov/mads/rdf/v1#> .

meta:TestClass a owl:Class ;
rdfs:subClassOf skos:Concept ;
rdfs:label "Test class"@en .

skosmos:testprop a rdf:Property ;
rdfs:label "Skosmos test property"@en ;
rdfs:comment "description for Skosmos test property"@en .

skosmos:multiLingOn a rdf:Property ;
rdfs:label "Skosmos test property"@en ;
rdfs:comment "description for Skosmos test property"@en .

skosmos:multiLingOff a rdf:Property ;
rdfs:label "Skosmos test property"@en ;
rdfs:comment "description for Skosmos test property"@en .

skos:prefLabel a rdf:Property ;
rdfs:label "preferred label"@en .

skos:altLabel a rdf:Property ;
rdfs:label "alternative label"@en .

skos:scopeNote a rdf:Property ;
rdfs:label "scope note"@en .

skos:broader a rdf:Property ;
rdfs:label "has broader"@en .

skos:narrower a rdf:Property ;
rdfs:label "has narrower"@en .

test:ta111 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
skos:inScheme test:conceptscheme ;
owl:deprecated true ;
skos:prefLabel "Loon"@en .

test:dt a rdfs:Datatype ;
rdfs:label "NameOfTheDatatype" .

test:dt2 a rdfs:Datatype .

test:ta112 a skos:Concept, meta:TestClass ;
skosmos:testprop "Test property value" ;
skos:notation "665"^^test:dt ;
skos:broader test:ta1 ;
skos:narrower test:ta121 ;
skos:exactMatch test:ta118 ;
skos:inScheme test:conceptscheme ;
skos:prefLabel "Owl"@en,
"Pöllö"@fi .

test:ta113 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
skos:inScheme test:conceptscheme .

test:ta114 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
dct:modified "1986-21-00"^^xsd:date ; # date invalid on purpose
skos:inScheme test:conceptscheme ;
skos:prefLabel "Albatross"@en .

test:ta115 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
skos:inScheme test:conceptscheme ;
skos:prefLabel "Chicken"@en .

test:ta116 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
skos:inScheme test:conceptscheme ;
skos:prefLabel "Cuckoo"@en ;
skos:narrower test:ta122.

test:ta117 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
skos:inScheme test:conceptscheme ;
skos:relatedMatch test:ta115 ;
skos:prefLabel "3D Cockoo"@en .

test:ta118 a skos:Concept, meta:TestClass ;
skos:inScheme test:conceptscheme ;
skos:exactMatch test:ta112 ;
skos:narrower test:ta123 ;
skos:prefLabel "-\"special\" character \\example\\"@en .

test:ta119 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
skos:inScheme test:conceptscheme ;
skos:prefLabel "Emu"@fi ;
skos:narrower test:ta123 .

test:ta120 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
skos:inScheme test:conceptscheme .

test:ta121 a skos:Concept, meta:TestClass ;
skos:broader test:ta112 ;
skos:inScheme test:conceptscheme ;
skos:prefLabel "Barn owl"@en .

test:ta122 a skos:Concept, meta:TestClass ;
skos:broader test:ta116 ;
skos:inScheme test:conceptscheme ;
skos:prefLabel "European cuckoo"@en .

test:ta123 a skos:Concept, meta:TestClass ;
dct:modified "2014-10-01T16:29:03+00:00"^^xsd:dateTime ;
skos:broader test:ta118, test:ta119 ;
skos:inScheme test:conceptscheme ;
skos:prefLabel "multiple broaders"@en .

test:ta124
a mads:ComplexSubject, skos:Concept ;
skos:prefLabel "Vadefugler : Europa"@nb ;
mads:componentList ( test:ta125 test:ta126 ) .

test:ta125
a mads:Topic, skos:Concept ;
skos:prefLabel "Vadefugler"@nb .

test:ta126
a mads:Geographic, skos:Concept ;
skos:notation "12.34" ;
skos:prefLabel "Europa"@nb .

test:ta127
a skos:Concept ;
skos:definition "For testing sorting and language names of getForeignLabels()"@en ;
skos:prefLabel "Test sorting labels 1",
"Test sorting labels 2",
"A first",
"Ä before 'A first' in English (default) collation",
"Test prefLabel"@fi;

skos:altLabel "A sort first"@fi,
"B sorts second"@fi,
"Ä way after B in Finnish collation"@fi,
"Finnish before Swedish in result array"@sv,
"No language tag becomes very first in result language array" .

test:ta128
a mads:Geographic, skos:Concept ;
skos:notation "testnotation"^^test:dt2 ;
skos:prefLabel "Europa2"@nb .

test:ta1 a skos:Concept, meta:TestClass ;
skos:inScheme test:conceptscheme ;
skos:narrower test:ta111,
test:ta112,
test:ta113,
test:ta114,
test:ta115,
test:ta116,
test:ta117,
test:ta119,
test:ta120 ;
skos:prefLabel "Birds"@en ;
skos:exactMatch <http://www.wikidata.org/entity/Q152> ;
skos:topConceptOf test:conceptscheme .

test:conceptscheme a skos:ConceptScheme ;
rdfs:label "Test conceptscheme"@en ;
dct:modified "2014-10-01T16:29:03+00:00"^^xsd:dateTime ;
owl:versionInfo "The latest and greatest version"^^xsd:string ;
skos:hasTopConcept test:ta1 .

10 changes: 2 additions & 8 deletions tests/test-vocab-data/test.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ test:ta112 a skos:Concept, meta:TestClass ;
"Finnish"@fi,
"Without lang tag" .

test:ta113 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
skos:inScheme test:conceptscheme .

test:ta114 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
dct:modified "1986-21-00"^^xsd:date ; # date invalid on purpose
Expand All @@ -93,8 +89,7 @@ test:ta115 a skos:Concept, meta:TestClass ;
test:ta116 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
skos:inScheme test:conceptscheme ;
skos:prefLabel "Bass"@en ;
skos:narrower test:ta122.
skos:prefLabel "Bass"@en .

test:ta117 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
Expand All @@ -110,8 +105,7 @@ test:ta118 a skos:Concept, meta:TestClass ;
test:ta119 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
skos:inScheme test:conceptscheme ;
skos:prefLabel "Hauki"@fi ;
skos:narrower test:ta123 .
skos:prefLabel "Hauki"@fi .

test:ta120 a skos:Concept, meta:TestClass ;
skos:broader test:ta1 ;
Expand Down
18 changes: 18 additions & 0 deletions tests/testconfig.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,24 @@
skosmos:defaultLanguage "en";
skosmos:sparqlGraph <http://www.skosmos.skos/test-concept-schemes/> .

:test-hierarchy a skosmos:Vocabulary, void:Dataset ;
dc:title "Test hierarchy"@en ;
dc:subject :cat_science ;
dc:type mdrtype:ONTOLOGY ;
void:dataDump <http://skosmos.skos/dump/test-hierarchy/> ;
void:uriSpace "http://www.skosmos.skos/test-hierarchy/";
skosmos:arrayClass isothes:ThesaurusArray ;
skosmos:defaultLanguage "en";
skosmos:feedbackRecipient "[email protected]";
skosmos:groupClass skos:Collection;
skosmos:marcSourceCode "ysa/fi"@fi, "allärs/sv"@sv;
skosmos:language "en";
skosmos:showTopConcepts "true";
skosmos:shortName "Test short",
"Testi lyhyt"@fi;
skosmos:hasMultiLingualProperty <http://www.skosmos.skos/multiLingOn>;
skosmos:sparqlGraph <http://www.skosmos.skos/test-hierarchy/> .

:showDeprecated a skosmos:Vocabulary, void:Dataset ;
dc11:title "Show deprecated test vocabulary"@en ;
dc:subject :cat_general ;
Expand Down

0 comments on commit a9f4d5b

Please sign in to comment.