Commit graph

1285 commits

Author SHA1 Message Date
Dan Stillman
14f7d3acad Cycle through httpd ports to prevent CI failures
We didn't seem to be doing this anymore, even though we had a comment
for it, and some tests were failing with NS_ERROR_SOCKET_ADDRESS_IN_USE.
2023-06-19 06:54:19 -04:00
Abe Jellinek
2639981dda
Block remote content when indexing HTML file (#3157) 2023-06-12 23:43:18 -04:00
Dan Stillman
117dbe1fe0 Clear Zotero.skipLoading after data directory tests
This was causing a startup error in the re-enabled debug output tests,
which don't reset app state.
2023-05-25 05:45:53 -04:00
Abe Jellinek
794b27c1ad Test debug output logging again
Now that we run tests in Zotero with application menus.
2023-05-24 20:59:29 +03:00
Abe Jellinek
caa1036da2 Remote translation: Don't use wantGlobalProperties
Not necessary - just use the properties we inherit from contentWindow. This
fixes the DOMParser constructor, which fails if called without a window context
from a non-system principal.

https://forums.zotero.org/discussion/105163/zotero-7-doi-translator-broken-in-scaffold
2023-05-23 22:30:24 +03:00
Dan Stillman
55fe6f33f5 fx-compat: Fix XMLSerializer calls
https://forums.zotero.org/discussion/105118/zotero-7-error-upon-exporting-in-mods-format
2023-05-22 01:34:41 -04:00
Abe Jellinek
fa31956d28
fx-compat: Fix feed button appearance/overflow behavior (#3114) 2023-05-09 16:38:33 -04:00
Dan Stillman
f21ca49d83 Fix sync engine tests after 00703c0b8 2023-05-05 06:38:00 -04:00
Dan Stillman
296c0142f2 fx-compat: OS.File.read()IOUtils.read() in getContentsAsync()
https://firefox-source-docs.mozilla.org/dom/ioutils_migration.html

This also fixes a bug when `getContentsAsync()` is passed an
`nsIInputStream` or `nsIChannel` where raw bytes were returned instead
of a string. Not sure if we're doing that anywhere. If we are, this
would presumably break that code, but the function is supposed to return
a decoded string.
2023-04-30 05:23:41 -04:00
Dan Stillman
0858960d33 Better logging for request count mismatches in Find Available PDF tests 2023-04-29 17:50:49 -04:00
Dan Stillman
a497f501e9 Update pdf-worker and update full-text test
Strip '\f' at end of extracted text and ignore '\n' in the middle of
text from the test PDF
2023-04-29 04:56:28 -04:00
Dan Stillman
26dade03f2 Z7: Fix ZoteroPane tests 2023-04-29 04:27:48 -04:00
Dan Stillman
95455dbd83 Fix tagsbox tests after shadow root removal 2023-04-29 03:15:15 -04:00
Dan Stillman
4a77bc4be0 fx-compat: Update conflict resolution merge window (#3090)
Tests passing, but not yet styled properly
2023-04-29 03:13:53 -04:00
Dan Stillman
dbefdaac2c Update snapshot tests for new SingleFile markup 2023-04-28 02:18:52 -04:00
Dan Stillman
46d0ce3cbf Don't load example.com in /saveSnapshot tests 2023-04-28 02:18:19 -04:00
Dan Stillman
fa143f1ea4 Z7: Update retractions tests 2023-04-28 01:54:00 -04:00
Dan Stillman
ed224dce34 Z7: Update relatedbox tests 2023-04-28 01:54:00 -04:00
Dan Stillman
82b4943d13 Z7: Update note editor tests 2023-04-28 01:54:00 -04:00
Dan Stillman
2c995c913e Z7: Update items test for andJoiner delimiters 2023-04-28 01:54:00 -04:00
Dan Stillman
b6522ae3f5 Z7: Update item pane teets 2023-04-28 01:54:00 -04:00
Dan Stillman
43ba4c3620 Don't check for .zotero-ft-info in test
No longer created
2023-04-27 03:48:49 -04:00
Dan Stillman
f95a6d0f0a Rename Zotero.Fulltext tests to Zotero.FullText 2023-04-27 03:48:01 -04:00
Dan Stillman
3ba78e28bb Update connectorTypeSchemaData and test data for Dataset Number removal 2023-04-27 03:44:25 -04:00
Dan Stillman
2e081ce8d2 Fix RemoteTranslate test after b222bbcccb
And remove duplicate test
2023-04-27 01:05:02 -04:00
Dan Stillman
947fa2b558 Ignore numeric values for Type: lines in Extra
https://forums.zotero.org/discussion/comment/433334/#Comment_433334
2023-04-26 04:55:43 -04:00
Dan Stillman
4a30dd2e4f Fix potential sync error after Replace Online Library in group
https://forums.zotero.org/discussion/104431/syncing-problem

Replace Online Library can upload annotations created by others in a
group library, so if the upload resulted in a local write, "Cannot edit
item in library" was thrown, since annotations by others aren't
writable. This should've only been a problem if the uploaded data was
actually modified by the server, but we were also checking whether
objects were editable before checking if they had actually changed, so
it would happen for any upload of another person's annotation.

This fixes the order of checks when saving objects and makes an
edit-check exception for saving uploaded data for group annotations.
2023-04-21 06:51:25 -04:00
Dan Stillman
f57c462b85 fx-compat: Don't use number as OS.Path.join() argument
It's dropped silently from the path in Fx102.
2023-04-19 17:41:11 -04:00
Abe Jellinek
a47a17852e Fix feed item drag test's after() callback 2023-04-17 16:28:10 -04:00
Adomas Venčkauskas
096a3c5f2f Add a test for feed update scroll issues. See fd744fb52 2023-04-17 12:30:31 +03:00
Dan Stillman
2397940292 Use httpd.js instead of resource:// URL for feed item drag test
Since HiddenBrowser doesn't work on resource:// URLs (at least without
modifications, and it wouldn't be representative)
2023-04-15 05:07:47 -04:00
Dan Stillman
40fd9e8759 Fix test for opening the Cite prefpane when clicking Manage Styles… 2023-04-15 03:35:17 -04:00
Dan Stillman
2796e6c80a Fix attachment tests that depend on HTML indexing
HTML files are now indexed instead of read directly, and indexing was
previous skipped in tests and otherwise performed on a delay, so set a
flag in the affected tests that triggers inline indexing.
2023-04-15 00:24:35 -04:00
Dan Stillman
b99e581929 Fix advanced-search tests 2023-04-15 00:24:02 -04:00
Dan Stillman
033733122a
Merge pull request #2784 from AbeJellinek/fx-compat-loadDocument
fx-compat: Implement Scaffold functions, SingleFile, PDF redirects, and style installation
2023-04-14 15:07:26 -04:00
Abe Jellinek
0612a9e6f5 fx-compat: Run translation and SingleFile in [hidden] browser
And replace loadDocuments().
2023-04-14 11:44:44 -04:00
Abe Jellinek
4b99b2715d fx-compat: HiddenBrowser: Add more options
- Make docShell properties configurable
- Allow requiring a successful HTTP status code
2023-04-14 11:43:48 -04:00
Dan Stillman
33ef7b1641 Prevent setting search .name to empty value
Prevents bug in zotero-citation plugin (at least on macOS) from creating
a search that breaks syncing

We were already checking for a missing name in `saveTx()`, but the
plugin is saving the same search twice in rapid succession, the second
time without a name, and the second attempt clears the search object's
name value after the first save's `_initSave()` check and before its SQL
write. The second save fails, but the first save goes through without a
name, resulting in a sync error.

https://forums.zotero.org/discussion/104274/id-1702002152-cannot-sync
https://github.com/MuiseDestiny/zotero-citation/issues/31
2023-04-12 22:23:13 -04:00
Dan Stillman
cadfca7475 Set a default annotation color if not assigned
https://forums.zotero.org/discussion/104249/sync-issue-on-ipados
2023-04-12 22:23:13 -04:00
Tom Najdek
a6042d3958
Mendeley importer: Fix issue with empty tags (#3018)
Also adds a test for this particular case and for importing tags in
general.
2023-04-06 17:10:13 +02:00
Tom Najdek
96022847d7
Mendeley importer: Fix issue with empty creators (#3016)
It does not appear to be possible to create a creator with no values in
Mendeley, however we got reports of these causing the imports to fail.
This tweak makes the importer more resilient by discarding empty/invalid
creators.
2023-04-06 17:10:13 +02:00
Tom Najdek
197d8d1f3b
Add option to Mendeley importer to relink items
New option only appears if importer version is < 1 or not present.
It will:
    * Skip fetching collections and attachments
    * Skip any new items
    * Update relations on existing items
2023-04-06 17:10:12 +02:00
Tom Najdek
4b523555d6
Mendeley Import: Auth using direct login
* Importer will now ask user for a login and password via form and will
  perform sign-in directly using credentials rather than oauth
* Signing in this way enables importer to obtain desktop document ID
  which is now stored for each item
* It's possible to switch back to the old method (ouath) by setting
  `import.mendeleyUseOAuth` pref to `true`.
* New option to only import new items. This options only appears if
  database contains previously imported items.
* Importer will now update mendeleyDB:documentUUID on existing items to
  match value used in Mendeley Desktop if available
* Importer will no longer create collections when no new items are
  imported * Importer will only report number of new items imported on
  re-import * Importer will now preserve dateAdded on re-import

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2023-04-06 17:10:12 +02:00
Abe Jellinek
f694f87d49 fx-compat: Update item pane tests 2023-04-04 14:52:10 -04:00
Dan Stillman
ab2e163234 Update test sample data for authority/legislativeBody base mapping 2023-04-03 00:41:35 -04:00
Dan Stillman
e27c1b5335 Add Dataset and Standard item types
zotero/zotero-bits#22
zotero/zotero-bits#52
2023-04-01 16:34:43 -04:00
Dan Stillman
1aa82094f1 Better way of skipping migration of Place and Date from Extra
Or at least a way that we already have built-in and that only applies to
the call in `Zotero.Item::migrateExtraFields()`. This doesn't
distinguish between CSL fields (`publisher-place`, `event-place`,
`issued`) and actual Zotero field, and we really only need to skip
the former, but it's fine.

Follow-up to e3cfeee81, related to #3030
2023-04-01 04:52:30 -04:00
Dan Stillman
e3cfeee813 Temporarily disable extracting Issued from Extra
Until we can parse ranges in the Date field. See #3030.

citeproc-js will still use it (which is the point).
2023-04-01 04:52:14 -04:00
Tom Najdek
01611cbb07
Temporarily disable folder import #2862 2023-03-23 14:16:51 +01:00
Tom Najdek
5ea43bd65c
fx-compat: Convert import wizard to use CE 2023-03-21 20:42:43 +01:00