Dan Stillman
730e86d661
fx-compat: Restore tests and test using actual Zotero executable
...
The test runner now uses the Zotero executable from
`zotero-standalone-build/staging` rather than the Firefox from
`zotero-standalone-build/xulrunner`. Along with testing the actual
program, this restores visible UI updates during tests, which should
make debugging various things easier. We can also now remove anything
related to Zotero being an extension.
Many tests are still broken, but this at least lets us start running
them.
2022-06-17 20:24:43 -04:00
Dan Stillman
5d08359dc9
fx-compat: Update httpd.js from mozilla-central 1739f130
2022-06-17 20:24:43 -04:00
Abe Jellinek
29b270e761
fx-compat: Fix progress queue / Find Available PDFs
2022-05-24 13:52:52 -06:00
Abe Jellinek
a2215cb8f6
fx-compat: Fix hard confirmation dialog
...
ID changed to commonDialog so we get commonDialog.css styling for free.
2022-05-24 11:43:45 -06:00
Abe Jellinek
547311ff26
Fix Create Bibliography
...
listbox is gone, but richlistbox is still here as a custom element and
works fine for cases where we don't need virtualization.
groupbox label and richlistitem styles should probably be copied to
somewhere global once tuned a bit.
2022-05-18 19:32:39 -07:00
Dan Stillman
bc68b6e9fe
fx-compat: Start to fix tag color chooser dialog
...
Among other things, need to recreate XBL <customcolorpicker> as a Custom
Element and need to change `ondialogaccept`/etc. to event listeners:
https://searchfox.org/mozilla-central/rev/b72e9d7d63bf499d1d8168291b93d4ec7fde236e/browser/components/places/content/bookmarkProperties.js#232-237
2022-05-13 04:28:57 -04:00
Dan Stillman
d838bc952a
fx-compat: Change "pref(" prefix in prefs file to "user_pref(" for tests
...
We now copy the prefs file into the app omni.ja, which requires
`pref()`, but for tests we copy it to the profile directory, where it
needs to stay as `user_pref()`.
2022-05-13 04:28:56 -04:00
Dan Stillman
94c7e0674d
fx-compat: Remove 'context' from onStartRequest()/onStopRequest()/etc.
2022-05-12 05:18:47 -04:00
Dan Stillman
dd2ff63019
fx-compat: Replace nsIDOMParser
with new DOMParser()
2022-05-12 02:38:59 -04:00
Dan Stillman
03242e8984
fx-compat: DB.executeTransaction() no longer takes generator functions
2022-05-12 02:38:59 -04:00
Dan Stillman
ccbc785499
fx-compat: XPCOMUtils.generateQI() → ChromeUtils.generateQI()
2022-05-12 02:38:59 -04:00
Abe Jellinek
9829ea7009
Update utilities, move tests, add to CI ( #2584 )
2022-04-30 04:55:11 -04:00
Abe Jellinek
3bfc6740c4
Add tests for improved compareCallNumbers
( #2579 )
2022-04-28 04:43:30 -04:00
Abe Jellinek
89aaa10504
Sort LC call numbers better, sort integers as integers ( #2569 )
...
* Update utilities submodule after https://github.com/zotero/utilities/pull/8
* Extract and add tests
2022-04-26 04:11:29 -04:00
Martynas Bagdonas
b8d427790c
Fix error when using a note template and checking if array is not empty
2022-04-23 14:52:24 +07:00
Abe Jellinek
f91ca9c18a
Don't merge with a deleted master attachment
2022-04-20 11:04:24 -07:00
Abe Jellinek
e8ad2fab95
getSortTitle: Only strip initial punctuation clusters ( #2537 )
...
Specifically exclude @, #, and *
2022-04-15 02:08:14 -04:00
Dan Stillman
08d3880d88
Don't remove relations in annotation item JSON
...
This was causing UUIDs for annotations from Mendeley imports to be
removed after a sync, resulting in annotations being duplicated on a
reimport.
2022-04-14 06:37:30 -04:00
Abe Jellinek
892c1169c8
Attachment merge: Compare link mode type
...
Actually fixes #2527 .
2022-04-11 09:30:16 -07:00
Martynas Bagdonas
2af7275968
Fix template condition evaluating to true for empty string from function
...
Fixes #2529
2022-04-11 12:22:20 +07:00
Abe Jellinek
47a2f3cad9
Attachment merge: Compare linkModes, improve logging
...
Using keys instead of IDs should make logs more useful.
Fixes #2527 .
2022-04-09 20:39:37 -07:00
Abe Jellinek
745069c070
Don't strip punctuation before numbers
...
Fixes #2496
2022-03-30 11:58:55 -07:00
Tom Najdek
56321a7a6d
Fix regression: download() fails for non-http URLs ( #2497 )
...
This fixes compatiblity with some addons that use Zotero.File.download
to extract files from their XPI bundle.
2022-03-30 12:15:40 -04:00
Tom Najdek
776769f480
Citavi import: Tweak how page label is determined ( #2494 )
...
Instead of attempting to extract `PageRange` value we now let pdf worker
always determine page label.
Also improved citavi tests and fixtures.
2022-03-30 09:34:07 -04:00
Dan Stillman
1d1adbca70
Fix error merging items with missing attachment files
...
Fixes #2453
2022-03-24 06:39:47 -04:00
Dan Stillman
174f1aadde
Fix error adding group item before syncing in Zotero 6
...
Fixes #2440
2022-03-21 22:50:43 -04:00
Abe Jellinek
bca76319ce
getSortTitle: Strip less punctuation, trim ( #2442 )
...
Now it:
1. Strips punctuation at the beginning, no matter what it is.
2. Strips non-dash punctuation in other positions.
3. Trims the result.
This should better prevent numerical ranges from being joined into a
single number that ends up incorrectly being sorted to the very bottom.
2022-03-21 20:06:27 -04:00
Dan Stillman
3ec883a7f6
Get attachment text on-demand if not cached in Item::attachmentText
...
Follow-up to 58f515058
with a better approach: if no full-text cache
file, just get text directly without indexing. In the one existing use
of `attachmentText`, attachment merging, this is better anyway, because
we might be deleting the file, so there's no point wasting time
inserting words into the database.
2022-03-12 20:22:29 -05:00
Dan Stillman
46ff3cf4fb
Add pending test for merging items with unindexed attachments by content
...
Follow-up to 58f51505
2022-03-12 19:11:39 -05:00
Martynas Bagdonas
78e1e8593a
Fix note template condition evaluating to true on empty array
...
Fixes #2386
2022-03-11 17:04:47 +02:00
Abe Jellinek
ef82becf00
Merge attachments and update notes ( #2336 )
...
We follow a different merge procedure for each attachment type:
- For PDF attachments, compare by MD5. If no match, get the top 50 words
in the attachment's text and hash those, then check again for a match.
Update references to item keys in notes and annotations.
- For web (snapshot / link) attachments, compare by title and URL.
Prefer a title + URL match but accept a title-only match.
- For other attachment types, keep all attachments from all items being
merged.
Also:
- Move most merge tests from Duplicates to Items#merge(). It just doesn't
make sense to worry about the UI in these.
2022-03-09 17:26:26 -05:00
Tom Najdek
8e8b03e5ff
Fix Citavi import test ( #2394 )
2022-03-09 14:04:23 -05:00
Tom Najdek
1ad2056674
Add support for importing Citavi annotatons ( #2351 )
2022-03-09 04:06:44 -05:00
Dan Stillman
c7ece79f79
Fix missing creators not being removed in item.fromJSON()
...
Apparently there's been a bug for years where removing a creator
remotely hasn't caused it to be removed locally via sync...
https://forums.zotero.org/discussion/94910/desktop-app-not-correctly-syncing
2022-03-09 02:43:22 -05:00
Dan Stillman
8b7afcf24c
Fix utilities_item tests after adding Preprint in 053d6a011
...
Attachments and notes are now mapped to CSL `document` (though it
shouldn't be possible to export attachments or notes to CSL JSON anyway)
2022-03-05 07:41:42 -05:00
Dan Stillman
1ce47bc404
Add Preprint item type to additional sample data for tests
2022-03-05 07:23:50 -05:00
Dan Stillman
32fc1cad9c
Add Preprint item type to sample data for tests
2022-03-05 06:03:44 -05:00
Dan Stillman
96347d4333
Fix error generate sample type/field data for tests
2022-03-05 06:03:44 -05:00
Martynas Bagdonas
b7f26c47c1
Split annotation if position data exceeds the limit
2022-02-28 20:10:20 +02:00
Dan Stillman
0e0bd0586b
Update assignProps
call in createUnsavedDataObject()
2022-02-21 21:22:46 -05:00
Dan Stillman
90531ea2a4
Fix notifier test after 078e3bb079
2022-02-21 19:22:29 -05:00
Dan Stillman
9cdcb2fd7c
Fix DB timeout test after 078e3bb079
2022-02-21 16:58:57 -05:00
Adomas Venčkauskas
9ca617a6a9
Fix broken tests in 000599b
2022-02-21 14:06:20 +02:00
Abe Jellinek
48a3235a2e
Disable Delete/Restore menu items appropriately ( #2340 )
2022-02-20 11:45:53 -05:00
Dan Stillman
b54b7edf9b
Don't set author name of current user when copying annotation from group
...
Fixes #2358
2022-02-19 13:47:28 -05:00
Dan Stillman
72ac453a8c
Set createdByUserID
to current user for locally created group item
...
Addresses #2322
2022-02-19 13:47:28 -05:00
Dan Stillman
5eee488e20
Update utilities submodule
...
And add tests for `Utilities.Internal.noteToTitle()`
Follow-up to zotero/utilities@df2dda23b
2022-02-19 13:43:41 -05:00
Martynas Bagdonas
5405da99db
Add support for annotation templates ( #2359 )
2022-02-18 14:38:36 -05:00
Dan Stillman
b99aeae76e
Add DB test for combination of numbered and unnumbered query placeholders
2022-02-17 01:43:39 -05:00
Dan Stillman
cb2df23580
Add tests for directoryContains()
...
Follow-up to #2335
2022-02-10 03:18:06 -05:00