Dan Stillman
47741e75fa
Restore locally deleted collections and searches that changed remotely
...
Also restore items that were in the collections
2017-06-18 09:11:21 -04:00
Dan Stillman
859c506913
Never auto-select new groups, since they always come from syncs
...
Fixes test failure from 2e74cd7831
2017-06-16 05:59:44 -04:00
Dan Stillman
69041832e7
Remove Zotero_Browser tests for new Firefox windows
...
I'm not sure if we need the browser tests at all -- we still translate
some things via hidden browsers, and I'm not sure what we have that
tests that -- but we definitely don't need to test saving before the
Zotero pane is opened.
2017-06-16 04:55:29 -04:00
Dan Stillman
4032edcf7d
Ignore note markup conflicts without cache when text content matches
2017-06-14 03:37:03 -04:00
Dan Stillman
3ebc238320
Close prefs window after WebDAV Verify Server tests
2017-06-14 03:37:03 -04:00
Dan Stillman
ccb30351c0
Fix incorrect purging of files on WebDAV
2017-06-14 03:20:23 -04:00
Adomas Venčkauskas
a17b486e4b
Don't auto-migrate data dir if target on a different drive
...
See https://forums.zotero.org/discussion/comment/277632/#Comment_277632
2017-06-13 17:17:34 -04:00
Dan Stillman
98f1ac5edb
Merge pull request #1240 from tnajdek/master
...
Tweaks to make build work on Windows
2017-06-06 02:18:45 -04:00
Dan Stillman
cd6079d869
Relax last-sync-time check in sync runner test
2017-06-06 02:14:23 -04:00
Tom Najdek
e86bbfbda0
Tweak test runner to work in MSYS environment on Windows
2017-06-06 00:36:03 -04:00
Dan Stillman
b79ecfb5fe
Temporarily disable test for non-integer getAsync()
2017-06-05 03:00:15 -04:00
Dan Stillman
898a1dc679
Add alternative to padStart for test in Fx45
2017-06-01 16:44:11 -04:00
Dan Stillman
05ff16c17f
Fix some breakage from 013dc958b3
2017-06-01 15:39:42 -04:00
Dan Stillman
ede03f4366
Update some Sinon reset() calls
...
In Sinon 2, reset() now resets both behavior and history, so if a stub
specifies behavior and we want to use it again, we have to call
resetHistory().
2017-06-01 15:39:42 -04:00
Tom Najdek
a59b78e59e
Tweak test syntax that breaks with current version of chai-as-promised
...
* Second parameter should be an optional message, however is treated
as a string that should be contained in the error message
2017-06-01 11:36:18 -04:00
Tom Najdek
4ec6925220
Remove "Error:" expected in error messages.
...
* "Error:" seems to have been injected into the message by Bluebird,
but that's no longer the case
2017-06-01 11:36:18 -04:00
Tom Najdek
063e13ef22
Modernize sinon.stub() calls
2017-06-01 11:36:17 -04:00
Tom Najdek
289b049377
Support generators in tests via coMocha, instead of custom code
...
* coMocha offers better error stack trace
2017-06-01 11:36:17 -04:00
Tom Najdek
14bf3184bb
Fixes and tweaks to make tests work with babelized code
...
* Use mocha, chai & sinon from the npm. As of sinon 2.0
sinon-as-promised is no longer required so it is removed
* Tweak code to re-use the same loader with the same environment
throghout the code
* Introduce browserify step for testing tools that only provide
node-compatible libraries (sinon, chai-as-promised)
* Introduce copy step for test data to resolve multiple issues with
tests depending on files not being symlinks
* Re-introduce custom implementation of setTimeout to resolve issues
with few tests
* Re-introduce custom Bluebird Promises config & monkey patch
2017-06-01 11:36:16 -04:00
Dan Stillman
748c30206f
Run tests from build dir
2017-06-01 11:36:16 -04:00
Dan Stillman
1e459287de
Convert non-standard octal escape sequences to hex in test runner
2017-05-24 01:59:56 -04:00
Dan Stillman
c0f7f6070a
Avoid a warning from a storageRequest test from the item not existing
2017-05-23 02:12:00 -04:00
Dan Stillman
e1fb28faa9
Convert some object ids from strings to integers after 4e1937680
2017-05-23 02:10:26 -04:00
Dan Stillman
265df6d48c
Skip edit check if skipAll is passed to object save
2017-05-22 17:29:56 -04:00
Dan Stillman
1b8704f133
Firefox 54 compatibility: File.createFromFileName() returns a promise
2017-05-22 06:04:27 -04:00
Dan Stillman
a3eea03a38
Firefox 54 compatibility: rename "new" and "delete" XBL methods
2017-05-22 06:03:14 -04:00
Dan Stillman
fc4eb5308f
Remove related-item relations when deleting item
2017-05-19 12:11:51 -04:00
Dan Stillman
90a27f8d4b
Add Zotero.URI.getURIItemLibraryKeyFromDB()
...
Allows getting libraryID and key without relying on library data being
loaded (e.g., at startup)
2017-05-19 12:11:21 -04:00
Dan Stillman
f12ae67c47
Test for e1986b460e
(export with empty attachment path)
2017-05-14 05:26:39 -04:00
Dan Stillman
20121b9b97
Fix tag selector tests (broken in 5963c02db
)
2017-05-12 06:13:02 -04:00
Dan Stillman
5963c02dbb
Fix "Display All Tags in This Library" (broken in fe186333b
)
2017-05-12 05:37:46 -04:00
Dan Stillman
60810ea0a0
Fix access date without time coming from sync
2017-05-11 00:44:37 -04:00
Dan Stillman
12e70460dc
Load polyfill in tests for Object.values() support in Fx45
2017-05-08 18:48:11 -04:00
Adomas Venčkauskas
dbeecb9b0a
Make itemFromCSLJSON independent of Zotero.Item existance.
...
Addresses !zotero/zotero-connectors#121"
2017-05-08 09:24:34 +03:00
Dan Stillman
e0e22225bc
Fix entering date without time into Accessed
...
https://forums.zotero.org/discussion/65560/5-0-beta-accessed-field-changes-dates
2017-05-05 17:59:53 -04:00
Dan Stillman
40da5f61a0
Still process downloads if uploads fail for a library
2017-05-05 03:26:29 -04:00
Dan Stillman
a1bd2bace5
Remove objects from sync queue if missing from response
...
While objects in the sync queue that fail to save should remain in the
queue, objects that just don't exist remotely need to be removed, or
else they'll be retried forever.
2017-05-05 01:04:16 -04:00
Dan Stillman
7a839e19a6
Fix background/stopOnError options for sync engine tests
2017-05-05 00:26:43 -04:00
Dan Stillman
2eef1702e0
Prevent items in group libraries from being added to My Publications
...
And remove existing group items that have been added
2017-05-04 21:18:44 -04:00
Adomas Venčkauskas
37fa0c203f
Write sessionID into the doc on new session creation
2017-05-03 14:34:00 +03:00
Adomas Ven
7d79865023
Merge pull request #1222 from adomasven/feature/document-preferences-cleanup
...
Document preferences cleanup
2017-05-03 13:09:49 +03:00
Dan Stillman
5b0b874435
Purge old objects in sync cache after upload
2017-05-03 03:43:59 -04:00
Dan Stillman
aa1fc01b31
Fix syncing of related item removal
2017-05-02 20:15:54 -04:00
Adomas Venčkauskas
3c19bbffe4
Remove store references in document option. Closes #1216
2017-05-02 16:29:19 +03:00
Adomas Venčkauskas
5e3c7bf63d
Fix test breakage from a76493f60
2017-05-02 15:09:12 +03:00
Dan Stillman
32b1769f2f
integrationTests.js -> integrationTest.js
2017-04-28 04:12:19 -04:00
Dan Stillman
fe88530120
Recover from a remotely missing parent collection
2017-04-28 03:18:50 -04:00
Dan Stillman
9bd01af2a5
Disallow inPublications for linked-file attachments
2017-04-27 15:33:24 -04:00
Dan Stillman
d715197b2f
Don't show Show/Hide button in My Publications for linked files
2017-04-27 04:52:50 -04:00
Dan Stillman
d527c340c6
Fix "text is not defined" error during full-text content sync
2017-04-26 02:44:01 -04:00
Adomas Venčkauskas
bbec11e3eb
Prepare 5.0 to handle JSON doc prefs
2017-04-20 18:03:15 +03:00
Adomas Venčkauskas
e272465f6c
Fix DocumentData serialization hairiness due to #htmlSpecialChars
...
Add tests
2017-04-20 13:39:19 +03:00
Dan Stillman
de7b56b8a1
Don't include items in My Publications in Unfiled Items
2017-04-17 21:34:08 -04:00
Dan Stillman
b3277de5ae
Update tests after citeproc-js upgrade to match output
2017-04-15 04:35:16 -04:00
Dan Stillman
e397d12d42
Update whitespace chars in cleanISBN/cleanISSN tests for Firefox 52+
...
Farewell, Mongolian Vowel Separator
2017-04-14 23:14:22 -04:00
Adomas Venčkauskas
49001572fd
Remove dependency on zoteroIntegration.idl
2017-04-14 14:19:52 +03:00
Adomas Venčkauskas
0de22b132e
Move document plugin interface description into integrationTests
2017-04-14 14:19:52 +03:00
Dan Stillman
9c91018964
Reduce indentation in waitForWindow() support function
2017-04-13 05:51:52 -04:00
Dan Stillman
6d18b46165
Fix test breakage after 5ff2a59f87
...
And remove all instances of `publicationsLibraryID`
2017-04-13 00:15:05 -04:00
Dan Stillman
5ff2a59f87
Move My Publications into My Library
...
Instead of My Publications being a separate library, have it be a
special collection inside My Library. Top-level items can be dragged
into it as before, and child items can be toggled off and on with a
button in the item pane. Newly added child items won't be shown by
default.
For upgraders, items in the My Publications library will be moved into
My Library, which might result in their being duplicated if the items
weren't removed from My Library. The client will then upload those new
items into My Library.
The API endpoint will continue to show items in the separate My
Publications library until My Publications items are added to My
Library, so the profile page will continue to show them.
2017-04-12 19:26:58 -04:00
Dan Stillman
4da0c4c1fc
Remove unused laststoragesync response from test
2017-04-12 05:37:15 -04:00
Adomas Venčkauskas
7657c9044d
Add Document.addEditBibliography to integration.js
...
See zotero/zotero-word-for-windows-integration#28 for background
2017-04-12 11:59:38 +03:00
Adomas Ven
2a5dbaa204
Merge pull request #1202 from adomasven/fix/doc-pref-window-unloaded-styles
...
Fix document preferences dialog failing when styles unloaded.
2017-04-12 11:52:58 +03:00
Adomas Venčkauskas
ea535bceb0
Add tests for style from untrusted source prompt
2017-04-12 11:48:06 +03:00
Adomas Venčkauskas
02c43c3643
Add integrationTests.js
...
Contains a dummy doc plugin, which is useful for:
- Testing integration.js functionality
- Serving as succint documentation for development of new integration
plugins
2017-04-12 11:45:10 +03:00
Dan Stillman
5d6478e507
429 and Retry-After support for API requests
2017-04-11 04:17:16 -04:00
Adomas Venčkauskas
269a250b4f
Fetch a style if it is not installed on document preferences load
2017-04-10 11:24:22 +03:00
Dan Stillman
d8fed09578
Mark local collection as unsynced if missing remotely in item request
...
We should figure out when this happens, but in the meantime, recover
from it if it does.
2017-04-07 00:57:50 -04:00
Dan Stillman
c43823ad60
Maybe fix noteeditor test failures for real
2017-04-01 14:29:45 -04:00
Dan Stillman
7609ef35bc
Allow setting note text with createDataObject('item') test function
2017-04-01 14:28:32 -04:00
Dan Stillman
bb489a45c3
Upload modified items after tag rename
...
The web library will probably still display the old tag in addition to
the new one, at least until browser restart. We'll have to deal with
that separately.
Closes #1205
2017-04-01 02:54:24 -04:00
Dan Stillman
09d4960e1f
Increase timeout to hopefully prevent noteeditor tag test from failing
2017-03-27 20:46:25 -04:00
Dan Stillman
3a8357cb95
Fix renaming and clearing of colored tags
2017-03-27 20:46:25 -04:00
Dan Stillman
fe186333be
Drastically speed up tag selector refresh with many tags
...
When refreshing, if fewer than 100 tags to show, just create them from
scratch instead of updating the full set. Otherwise, remove the full set
from DOM and add it back in after updates to avoid reflows (from #1204 ).
There are various things that could be done to optimize this further
(avoiding unnecessary sorting during full refreshes, calculating a hash
of the full set and not updating it every time), but we should probably
just replace it with @tnajdek's React version first.
Closes #1204
2017-03-27 20:45:22 -04:00
Dan Stillman
edb53c31df
Fix updating of tag selector after filtering the middle pane
...
Adds a 'refresh' event to libraryTreeView
2017-03-24 05:37:41 -04:00
Dan Stillman
820755e152
Rework libraryTreeView event handling
...
Changes `libraryTreeView::addEventListener('load')` and similar to
`libraryTreeView::onLoad.addListener(listener, once)`, etc. `once` is an
optional boolean that, when true, causes the listener to fire once and
then be removed. This is implicit for 'load'.
'load' maintains its special behavior of running immediately if the
treeview has already been loaded.
Also adds `waitForLoad()` and `waitForSelect()` functions that return
promises on event completion, since most uses of those events were just
resolving deferreds.
2017-03-24 05:23:56 -04:00
Dan Stillman
1a4b7121d3
Move waitForTagSelector() into support.js
2017-03-24 00:51:25 -04:00
Dan Stillman
a3473896a5
Fix error showing some WebDAV verification errors
2017-03-13 16:02:34 -07:00
Dan Stillman
640aaa1557
Add loadPrefPane(paneName) support function
...
E.g., loadPrefPane('sync') to open the prefs and select the
'zotero-pane-sync' pane
2017-03-13 16:02:34 -07:00
Dan Stillman
e9fd7f2dd1
Update Collection::getChildItems() when erasing item
...
Fixes #1188
2017-03-07 01:54:49 -05:00
Dan Stillman
9e59500619
Fix file sync error on Windows for old filenames containing colons
...
OS.Path.basename() stops at colons on Windows, so calling it on the full
path produces unexpected results.
2017-03-06 22:04:56 -05:00
Dan Stillman
1b81004a93
Remove errant HTML tag
2017-03-03 16:40:28 -05:00
Dan Stillman
fe9fc8bc5a
Asyncify various functions to fix cross-library drag-and-drop error
...
When dragging an item to another library, we have to check if there's a
linked item in the target library, but items might not yet be laoded in
the other library, so item.getLinkedItem() can fail with "Item [n] not
yet loaded].
Fixing required asyncifying the follow functions:
- Zotero.Item::getLinkedItem()
- Zotero.Collection::getLinkedCollection()
- Zotero.URI.getURIItem()
- Zotero.URI.getURICollection()
- Various integration functions
2017-03-03 16:40:28 -05:00
Dan Stillman
7c25093ca2
Fix various error propagation issues during translation
...
As noted in 27cb099c82
, import translators should be rewritten to return
a promise from doImport() and wait for promises from successive
item.complete() calls. They should then be marked as minVersion: "5.0"
to be handled properly by this new code.
(But this tries to account, albeit with somewhat worse behavior, for
translators that haven't been rewritten and sandboxes without Promise
(which is currently the case with child sandboxes in the client).)
(Oh, and I haven't tested this at all in the connectors.)
2017-03-03 04:51:01 -05:00
Dan Stillman
7ccf781add
Firefox 52 compatibility
2017-03-02 15:30:54 -05:00
Dan Stillman
0d8643087a
Update relations using local user key when first setting sync user
...
In case items are merged before the first sync
2017-03-01 23:38:45 -05:00
Dan Stillman
ba91a2ea52
Fix updating of notes list when child note is changed or moved to trash
2017-03-01 01:39:39 -05:00
Dan Stillman
6c58389563
Fix translation error when firstName is null for fieldMode 1
...
Some translators (e.g., CrossRef) return firstName: null with fieldMode:
1, which was causing an error
2017-02-27 23:34:16 -05:00
Dan Stillman
a35d903e77
Increase size of browser window during tests
...
Makes it easier to manually increase Zotero pane before a timeout while
debugging (though the page should just be made bigger by default)
2017-02-27 04:54:11 -05:00
Dan Stillman
d0a1ac9677
Fix potential incorrect placement of new subcollections
...
For one particular complicated collection structure, new collections
could be placed in the wrong place until a restart.
2017-02-27 04:51:04 -05:00
Dan Stillman
18877a9748
Additional test for updateSynced()
...
Addresses #1187
2017-02-27 03:11:09 -05:00
Dan Stillman
cb5e1fa431
Handle paginated results in Zotero.Sync.APIClient.getGroups()
2017-02-24 18:41:37 -05:00
Dan Stillman
57626101ac
Fix incorrect tests due to the bug fixed in b21729edd1
2017-02-24 03:50:31 -05:00
Dan Stillman
3ba2b40c4c
Remove obsolete Zotero.Libraries.isFilesEditable test after 88184b341
2017-02-24 03:29:50 -05:00
Dan Stillman
80a0826eb6
Add archived group handling to sync runner
...
- Archive remotely missing that user chooses to keep
- Ignore archived groups that don't existing remotely
- Unarchive groups that become available again
2017-02-24 02:36:18 -05:00
Dan Stillman
9ac458e05c
Add 'archived' property to Zotero.Library objects
...
Set when a user loses access to a library but chooses to keep it as a
read-only library.
2017-02-24 02:36:18 -05:00
Dan Stillman
88184b341b
Setting a library's 'editable' to false should do same for 'filesEditable'
2017-02-24 02:36:18 -05:00
Dan Stillman
74d1cc193a
Check database values in Zotero.Library#editable tests
2017-02-24 02:36:18 -05:00
Dan Stillman
f7074a75b5
Fix error deleting selected library
2017-02-24 02:36:17 -05:00
Dan Stillman
383eac4657
Use same directory for OS.File.moveAtomic() temp file
...
Using the main temp directory was causing writes to fail when storage
was on another filesystem.
2017-02-22 19:53:48 -05:00