Commit graph

18 commits

Author SHA1 Message Date
Martynas Bagdonas
c0a4fa43f0 Add a test for PDF recognition by DOI (#1496) 2018-05-04 03:14:26 -04:00
Dan Stillman
8f39e9cb36 Rename PDF recognizer tests to reflect arXiv ID lookup
Addresses #1494 and #1495
2018-05-04 01:16:04 -04:00
Dan Stillman
4f9847da04 Save parent item to correct library when recognizing PDF without DOI 2018-04-02 15:34:22 -04:00
Dan Stillman
3cc92fe1e9 Fix PDF recognition within collection (broken by f8b41c971c) 2018-03-01 01:20:29 -05:00
Dan Stillman
f99038fd37 Fix recognizer dialog with multiple tests
Do cleanup on 'unload' rather than 'close' (which is limited to a click
on the close button and doesn't get called for win.close()) and clear
the queue after each test.
2018-03-01 01:20:29 -05:00
Dan Stillman
f8b41c971c Automatic attachment file renaming changes
Automatic renaming is now done for dragging of an external file onto an
item (as added in 7cb95f41) as well as dragging as a linked file,
dragging a non-native (not text or HTML) URL, "Attach Link to File…",
"Attach Stored Copy of File…", and "Retrieve Metadata for PDF". It only
applies if a single file is being added and if the parent item has no
non-HTML attachments. By default, the renaming only applies to PDFs, but
this can be changed with the renameAttachmentFiles.automatic.fileTypes
hidden pref.

A new General pref, "Automatically rename attachment files using parent
metadata", controls whether the renaming happens.

Files saved via web translators are renamed regardless of this pref,
because they would often be gibberish otherwise.

Closes #113
2018-02-27 18:45:03 -05:00
Martynas Bagdonas
991a50d090 New PDF recognizer 2018-02-20 09:32:06 +02:00
Dan Stillman
45ddf9827c Reset PDF tools path for tests in resetDB()
And include path on error when running PDF tool
2018-02-07 04:04:37 -05:00
Martynas Bagdonas
723b4d32e5 Fix Zotero.Fulltext tests 2018-01-18 18:54:54 -05:00
Martynas Bagdonas
0d5ea8520a Use the bundled PDF tools 2018-01-17 13:33:18 +02:00
Dan Stillman
205bab7b89 Fix Travis failure after skipped test
Apparently after() is run even if a test is skipped
2016-12-21 05:28:48 -05:00
Dan Stillman
4b602ed26c Disable all recognizePDF tests in Travis 2016-12-18 09:18:57 -05:00
Dan Stillman
6994c63a0e Tweak recognizePDF fix, add test coverage, and enable manual tests
Still disabled in Travis until we mock the remote services
2016-12-17 08:05:33 -05:00
Dan Stillman
2d88b07855 Set Zotero.automatedTest flag instead of .noUserInput on Travis
And don't skip alerts in Zotero.alert() during automated tests. (That
was intended to avoid long timeouts after unexpected failures, but,
e.g., PDF metadata lookups (which are currently disabled in automated
tests) should just be mocked so they don't intermittently fail.)
2016-06-24 18:28:32 -04:00
Dan Stillman
e573ad886f Update recognizePDF tests
- Add test for recogning within a collection (follow-up from #1015)
- Update/remove some outdated code

These tests are still skipped by default, since we don't want to actually do
lookups on every test run.
2016-05-27 01:33:34 -04:00
Dan Stillman
2154673dd3 Return a Zotero.Item from all Zotero.Attachments methods
These previously returned an itemID, but now that new saved items can be edited
without a refetch, they should just return the new item.

(Possible I missed a few spots where these are called.)
2015-05-29 05:33:54 -04:00
Dan Stillman
3fc09add3a Attachment fixes
Change all attachment functions to take parameter objects, including a
'collections' property to assign collections. (Previously, calling code
assigned collections separately, which required a nested transaction,
which is no longer possible.)

Fixes #723, Can't attach files by dragging
2015-05-23 04:43:37 -04:00
Dan Stillman
ac12d5891a Rename remaining files to *Test.js
Closes #701
2015-05-19 14:46:17 -04:00
Renamed from test/tests/recognizePDF.js (Browse further)