zotero / scaffold

Zotero translator creation IDE
http://www.zotero.org/support/dev/scaffold
38 stars 9 forks source link

Saving tags in tests different #47

Open zuphilip opened 6 years ago

zuphilip commented 6 years ago

It looks that previously in the test cases the tags were simply saved as a list of strings, but now with the newest Zotero 5.0 compatible version the tags are saved as a list of objects of strings. This makes the test result looks different, e.g. tests from ACM translator

"tags": [
-     "calling context tree"
+     {
+       "tag": "calling context tree"
+     }
-     "performance-aware revision control"
+     {
+       "tag": "performance-aware revision control"
+     }
-     "profiling"
+     {
+       "tag": "profiling"
+     }
]

Do we want to continue the new way or switch back to the old way?

dstillman commented 6 years ago

I fixed the comparison for tests (including in Scaffold, I believe) in https://github.com/zotero/zotero/issues/1254 on the xhr-processDocuments branch of the client, which we'll try to merge soon. But as I noted in https://github.com/zotero/translators/issues/1356#issuecomment-313366798, it's incorrect as an object anyway if it's not including type: 1 (automatic), so if that's still happening we should fix it, and for the sake of readability and conciseness probably just have it return a string (since Zotero RDF is the only case where we'd actually want type: 0).