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

Test suite always reporting Fail #16

Open
awwright opened this issue Apr 16, 2018 · 3 comments
Open

Test suite always reporting Fail #16

awwright opened this issue Apr 16, 2018 · 3 comments

Comments

@awwright
Copy link
Contributor

The test suite is always reporting fail for me. Every single test, except the negative tests, reports either Fail or Error. The problem seems to be that kb.query at https://github.com/rdfa/rdfa.github.io/blob/a356283800723200fa5bf8f70524722b6a8b3a57/javascripts/models/test-model.js seems to be returning an empty array for a match, and undefined for no match.

that.set("result", queryResult); also needs to be called to update the result correctly.

When I edit the code to accept an array as a successful match, the suite works as expected.

Did a dependency update break something, maybe?

@gkellogg
Copy link
Member

It’s been quite some time since I last worked on this code, and I don’t think any dependencies could have changed in that time. Unless the browser is doing something with return results, the Server return shouldn’t be any different.

I’m not in a situation o test this now, but I would look to see what’s happening on the Ruby server side running off localhost. That said, a PR to make the JavaScript code more robust would be welcome.

@gkellogg
Copy link
Member

I think the problem is that you’re running the test from this site, rather than RDFa.info/test-suite, but that may be in an indeterminant state. The RDFa.github.io site is part of an attempt to replace that site, and depends on the JavaScript SPARQL library, but I believe it is incomplete, and the library may, indeed, and changed out from underneath it.

You can also point your implementation to the site, and run all the tests in each manifest and evaluate the results yourself.

@awwright
Copy link
Contributor Author

awwright commented Apr 16, 2018

I should have mentioned I tried running the site from http://rdfa.info/test-suite/ in Chrome and Safari on macOS.

Also to provide an example of the output, here's my result for the HTML5 RDFa1.1 test /test-suite/test-cases/rdfa1.1/html5/0001.html:

<http://rdfa.info/test-suite/test-cases/rdfa1.1/html5/photo1.jpg> <http://purl.org/dc/elements/1.1/creator> "Mark Birbeck".

This is almost character-for-character what's found in the SPARQL.

I can see what you're talking about, if I change to https://rdfa.info/test-suite/, the tests all fail from the query validator, the result isn't exactly the same:

<https://rdfa.info/test-suite/test-cases/rdfa1.1/xml/photo1.jpg> <http://purl.org/dc/elements/1.1/creator> "Mark Birbeck".

Thanks for your work @gkellogg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants