TestPeopleQuery
comment Run SPARQL query to list all people
deleteAllVisibleCookies
open /vivo/
assertTitle VIVO
comment Must not be logged in
clickAndWait link=Log in
assertTitle VIVO Site Administration
comment Must login as site admin
type username testAdmin@cornell.edu
type loginPassword Password
clickAndWait loginSubmitMode
assertTitle VIVO Site Administration
comment Navigate to SPARQL query option on Site Administration page
clickAndWait link=SPARQL query
assertTitle SPARQL Query
selectWindow null
comment Enter query
type query PREFIX rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:  <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd:   <http://www.w3.org/2001/XMLSchema#>
PREFIX owl:   <http://www.w3.org/2002/07/owl#>
PREFIX swrl:  <http://www.w3.org/2003/11/swrl#>
PREFIX swrlb: <http://www.w3.org/2003/11/swrlb#>
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
PREFIX vivo:  <http://vivo.library.cornell.edu/ns/0.1#>
PREFIX foaf:  <http://xmlns.com/foaf/0.1/>
PREFIX core: <http://vivoweb.org/ontology/core#>
PREFIX bibo: <http://purl.org/ontology/bibo#>

#  This query returns name and  NameURI,
#  remove the comment pound sign in front of lines to "uncomment" them
#  uncomment the filter line and edit name text "Jill" to return specific people

SELECT ?personL ?person
WHERE
{

     ?person rdf:type foaf:Person .
     ?person rdfs:label ?personL .

     #filter(regex(?personL,"Jill","i"))
}
ORDER BY ?personL
LIMIT 100
click //input[@value='Run Query']
pause 50000
comment Verify query output
verifyTextPresent personL
verifyTextPresent "Jane Faculty"@en-US
verifyTextPresent "Lilly Librarian"@en-US
verifyTextPresent person
verifyTextPresent <http://vivo.local.edu/individual/n
verifyTextPresent <http://vivo.local.edu/individual/n
goBackAndWait
assertTitle SPARQL Query
comment Log out
clickAndWait link=Log out
assertTitle VIVO