Commit graph

6827 commits

Author SHA1 Message Date
Dan Stillman
f78b18c692 Fix ES6 warning calling UInt8Array without 'new' 2015-04-25 03:17:40 -04:00
Dan Stillman
0e800f350c Throw errors instead of logging for some item load calls
Reverts a change in b83bc404, and changes one debug line introduced
there into an error
2015-04-25 03:17:40 -04:00
Dan Stillman
f68a595a2b Remove Zotero.DataObject._eraseRecoverFromFailure() 2015-04-25 03:17:40 -04:00
Dan Stillman
4b040c78a7 Fix various saved search bugs, and add tests
Search condition ids are now indexed from 0, and always saved
contiguously (no more 'fixGaps' option), since they're just in an array
in the API. (They're still returned as an object from
Zotero.Search.prototype.getConditions() because it's easier for the
advanced search window to not have to deal with shifting ids between
saves.)
2015-04-17 19:29:37 -04:00
Dan Stillman
d9c32a8e90 Fix search saving, and add some unit tests
Also:

- Return an object from `Zotero.Search.prototype.getConditions()`
  instead of an array.
- Add support function `getPromiseError(promise)` to return the error
  thrown from a chain of promises, or false if none. (We could make an
  `assert.throwsAsync()`, but this allows testing of various properties
  such as `.name`, which even the built-in `assert.throws()` can't
  test.)
- Clarify some search save errors
2015-04-17 00:25:09 -04:00
Dan Stillman
59773f3f6d Zotero.Search.getSearchCondition(s) -> getCondition(s) 2015-04-17 00:25:09 -04:00
Dan Stillman
1952fbccd4 Wait for Zotero.Searches initialization 2015-04-16 20:50:15 -04:00
Dan Stillman
51c7ae6e5c Add -b option to skip translator/style installation in tests
'b' for *b*undled files

Translators and styles take a long time to install and initialize in
source installations, and they're unnecessary for many tests.

This shaves about 10 seconds off each test run for me on one system (and
that's with some help from filesystem caching).
2015-04-16 20:50:15 -04:00
Dan Stillman
0154e44c2f Mark all data as loaded when loading primary data for nonexistent object 2015-04-16 20:49:18 -04:00
Dan Stillman
293f7c6dd4 Zotero.Search.prototype.addCondition() doesn't need to be async 2015-04-16 20:48:59 -04:00
Dan Stillman
973e602cfc Enable Bluebird generator support in Mocha
Promise-yielding ES6 generator functions can now be used for test
functions, and they'll automatically be wrapped with Bluebird's
coroutine().
2015-04-15 01:35:53 -04:00
Dan Stillman
384a547693 Merge branch '4.0' into api_syncing
Conflicts:
	chrome/content/zotero/lookup.js
2015-04-15 00:56:25 -04:00
Dan Stillman
a8d1080cd6 Unpromisify a couple Zotero.Translator.get() calls
More to be done to fix translation
2015-04-15 00:50:22 -04:00
Dan Stillman
96f3cc1861 Enable debug.time pref in tests 2015-04-15 00:48:03 -04:00
Dan Stillman
71d2aa9337 Update resetDB test for async DB 2015-04-15 00:45:59 -04:00
Dan Stillman
e8b7b38290 Remove some obsolete synchronous DB code 2015-04-15 00:45:59 -04:00
Dan Stillman
4f9366749c Add Zotero.alert() method
This is just a wrapper around nsIPromptService.alert() that takes
Zotero.noUserInput into consideration, which avoids long timeouts during
testing (e.g., for lookup failures).
2015-04-14 16:09:55 -04:00
Dan Stillman
7b72d47070 Zotero.File.putContentsAsync() fixes
Breakage from e6ccca3230
2015-04-13 03:45:25 -04:00
Dan Stillman
915542e696 Throw Error, not Exception 2015-04-13 03:45:25 -04:00
Dan Stillman
2a3af13ddf Automatically return local user URI from Zotero.URI.getLibraryURI()
Previously, getItemURI and getCollectionURI had to check the libraryID
to determine whether to return a local URI, and were doing so using an
obsolete check.
2015-04-13 03:45:25 -04:00
Dan Stillman
6dfdae870e Q -> Bluebird in tests 2015-04-13 03:44:59 -04:00
Dan Stillman
a91151756b Fix test running after schema updates
Tests still need to be updated for Bluebird/promisification
2015-04-13 02:25:34 -04:00
Dan Stillman
fec43f1f62 Merge branch '4.0' into api_syncing 2015-04-13 02:01:43 -04:00
Dan Stillman
9511c43432 Create empty data directory in test profile
This prevents the data directory migration prompt from showing up if
there's an existing data directory inside the Standalone profile.
2015-04-12 20:28:50 -04:00
Dan Stillman
a0b3c1f6ac Merge pull request #698 from aurimasv/patch-1
More informative error messages for failed file loads
2015-04-10 21:40:44 -04:00
Aurimas Vinckevicius
164f4e4321 More informative error messages for failed file loads 2015-04-10 19:46:57 -05:00
Dan Stillman
b599aed8ed Fix pasting of non-HTTP URLs into notes from non-note sources
Copying zotero:// and other non-HTTP links from a note itself was fixed
in #452, but copying such links from other sources still stripped the
hrefs. This removes the patch in #452 and just gets the HTML directly
from the clipboard. I'm not sure why TinyMCE doesn't try to do this by
default (it only tries for plaintext), so maybe there's a problem with
this approach, but it seems to work for me (strips bad HTML, etc.).

Fixes #697
2015-04-10 13:08:25 -04:00
Dan Stillman
1c2b2575f7 Fix excessive file sync mtime updates/checks (probably?) 2015-04-09 03:47:43 -04:00
Dan Stillman
f5ce2d238e Fixes #546, Advanced search : match "any" is broken 2015-04-09 02:57:29 -04:00
Dan Stillman
c1a581168a Merge locales from Transifex 2015-04-09 00:26:12 -04:00
Dan Stillman
1e2346eba1 Revert to modified 3.02 binaries on Windows
To deal with issues running .vbs scripts on some systems. If the 3.02
binaries haven't been reinstalled since this version, reinstall them as
3.02a automatically or on manual upgrade to fix corrupted binaries from
previous gzip issue.

Other platforms unchanged
2015-04-09 00:22:32 -04:00
Dan Stillman
b2d5612526 Fix sync and debug output submission in Nightly
(sendAsBinary() removal)
2015-04-07 16:59:33 -04:00
Dan Stillman
2afebc79d0 Set tree image height to 16px everywhere
Windows maybe also doesn't handle HiDPI tree images correctly otherwise
2015-04-07 14:37:13 -04:00
Dan Stillman
c398353d5d Remove obsolete CSS include 2015-04-07 14:26:49 -04:00
Dan Stillman
fe79954b96 Fix HiDPI icons in trees on Linux 2015-04-07 14:25:24 -04:00
Dan Stillman
152b1c0d83 Merge pull request #692 from aurimasv/test-beta_build
Add Firefox Beta for Travis-CI testing
2015-04-07 03:13:19 -04:00
Dan Stillman
61e11f9afa Fix main toolbar icons in 2x mode on Win/Linux 2015-04-07 03:06:25 -04:00
Dan Stillman
adadc9e03a Accept a string path in Zotero.Utilities.Internal.exec() 2015-04-07 01:16:17 -04:00
Dan Stillman
31941c0798 Fix flashing console window for Retrieve Metadata on Windows 2015-04-07 01:14:18 -04:00
Aurimas Vinckevicius
f6510419cb Skip test for "recognizePDF without DOI" on Travis-CI
Breaks due to CAPTCHA when tests are run frequently
2015-04-06 23:17:41 -05:00
Aurimas Vinckevicius
ac363101fc Always use latest Firefox version and echo it for tests
Don't echo version on Windows, because it hangs Firefox
Also add testing with Firefox Beta (and prior ESR, but commented out for now, since we don't support it and we know it breaks)
2015-04-06 23:16:44 -05:00
Dan Stillman
796a1a2898 Use firstCreator instead of creators[0] for QuickFormat sort
Previously, if an editor was entered before an author, it would sort by
the editor. Now, as long as there's an author, it will sort by that
first (and, with 2f3d865f, favor left-bound matches).

Addresses the second issue on
https://forums.zotero.org/discussion/48047/
2015-04-06 23:32:15 -04:00
Dan Stillman
2f3d865f11 Favor left-bound name matches in QuickFormat bar
https://forums.zotero.org/discussion/48047/
2015-04-06 23:14:32 -04:00
Dan Stillman
bfbf3d871c Fix display of sync error icon (2x and spacing) 2015-04-06 17:39:21 -04:00
Dan Stillman
af871a3fd5 Add 2x versions of many icons
Courtesy of Pastel SVG (2x famfamfam)

I didn't add 2x versions for any composite icons or any Fugue icons.

Also:

- Removed some unused/redundant images
- Switched to shadowless versions for a couple Fugue icons
2015-04-06 17:24:55 -04:00
Dan Stillman
58b56abbc7 Fix file sync errors with symlinked files/directories
nsIFile seems to have figured out symlinks since Firefox 3.0.1
2015-04-04 00:09:24 -04:00
Dan Stillman
788f92bc8b Fix sync error panel positioning (at least on OS X)
After 88be88661
2015-04-03 23:54:37 -04:00
Dan Stillman
4613f9593c Don't update pdfinfo unnecesarily 2015-04-01 16:43:37 -04:00
Dan Stillman
e567ad25aa More PDF tools tweaks
- If one tool is missing, reinstall it automatically during translator
  update check
- Account for pdfinfo 3.02pl1 on Linux
2015-04-01 16:35:13 -04:00
Dan Stillman
1a47d79716 Restore support for modified pdfinfo 3.02 2015-04-01 13:20:34 -04:00