Commit graph

62 commits

Author SHA1 Message Date
Dan Stillman
7504086a5e Use modified Firefox executable from zotero-standalone-build in tests 2019-08-27 00:47:39 -04:00
Dan Stillman
d89fe8e80a Fx60: Add extensions.legacy.enabled for tests 2019-08-27 00:47:39 -04:00
Dan Stillman
cde5db463a Fx60: Restore default prefs in tests
Default prefs from legacy extensions don't seem to be used anymore
2019-08-27 00:47:39 -04:00
Dan Stillman
ac456ab9bf Fx60: Additional prefs changes for tests 2019-08-27 00:47:39 -04:00
Dan Stillman
6cb4057fee Disable updates of bundled files in tests 2018-08-25 16:55:13 -04:00
Dan Stillman
18d0e980d1 Increase Travis test timeout to 15 seconds
Though it probably won't help, since I imagine most timeouts are hangs
caused by race conditions
2018-03-01 03:38:46 -05:00
Martynas Bagdonas
d810deaa9c Update PDF tools version and fix fulltext test 2018-02-14 04:00:02 -05:00
Dan Stillman
37eb597ee8 Cache PDF tools in the source directory between test runs
This avoids having to download a 13 MB file on every test run.
2018-01-18 19:24:09 -05:00
Martynas Bagdonas
5815088586 Fix PDF tools usage in tests 2018-01-18 12:23:27 +02:00
Dan Stillman
da1dd75265 Don't compress uploaded data in tests
It would be better to handle this automatically in Sinon, but as it is
uploads are compressed if they're bigger than an arbitrary limit, which
can break tests unexpectedly if they check req.requestBody.
2017-12-08 00:42:03 -05:00
Dan Stillman
10a5d8d02e Check for Firefox profile access at startup and show warning
f40b7ae6ac didn't help with people who've already upgraded, so check at
startup and show a warning if the profile is inaccessible until 1) the
profile has been accessed once or 2) the user checks "Don't show again"
in the warning dialog.

Also fix Zotero.Profile.getDefaultInProfilesDir() to properly throw an
error if it can't access the default directory.
2017-11-17 22:49:57 -05:00
Dan Stillman
15942b97ae Bail on auto-build failure when running tests 2017-10-27 01:08:48 -04:00
Dan Stillman
6e1e2dcf76 Disable e10s for tests 2017-10-04 21:35:22 -04:00
Dan Stillman
959772dc00 Disable app update during test runs 2017-10-01 22:06:35 -04:00
Dan Stillman
b1fad5a310 Automatically run JS build process before tests if not running 2017-07-01 06:31:46 -04:00
Dan Stillman
c11f1069d7 Add -e flag to runtests.sh to stop tests after a given file
This is useful when trying to debug an error that only happens after a
number of other tests have run -- specify -e and run tests from either
an earlier file with -s or from the beginning.
2017-06-20 05:48:38 -04:00
Dan Stillman
26145c3892 Additional prefs in tests to bypass Telemetry prompt 2017-06-19 00:42:31 -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
748c30206f Run tests from build dir 2017-06-01 11:36:16 -04:00
Dan Stillman
90a3013802 Disable script run time warning in tests 2017-01-21 06:37:44 -05:00
Dan Stillman
238ab80699 Add -s flag to runtests.sh to start at given file
Useful for restarting after spurious errors when using -f

E.g., ./runtests.sh -s syncEngine
2016-12-16 04:21:37 -05:00
Dan Stillman
8799bb4ebd Remove Travis debugging 2016-11-29 03:29:45 -05:00
Dan Stillman
30d0858ebf Travis debugging 2016-11-29 01:42:15 -05:00
Dan Stillman
a735d5dd41 Remove Travis debugging 2016-11-27 20:02:53 -05:00
Dan Stillman
837ae0444d Travis debugging 2016-11-27 19:51:48 -05:00
Dan Stillman
288d0c7c06 Create 'profile' and 'Zotero' directories in temp dir for tests 2016-11-22 01:45:07 -05:00
Dan Stillman
cfe76a6f83 Add Zotero.test, which is true during tests
(Zotero.automatedTest is only true in Travis)
2016-11-13 04:54:57 -05:00
Adomas Venčkauskas
c1a3a8411f File descriptor hard limit changed to 4096 on Ubuntu 16.10 2016-10-21 12:29:29 +03:00
Adomas Ven
82fcb09716 Adds a way to distinguish linux windows (#1078)
Only enabled on Xorg environments, so checks $DISPLAY
https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#X11_options
2016-08-16 04:03:07 -04:00
Dan Stillman
daf0f8e0b0 Merge branch '4.0' 2016-08-14 17:27:36 -04:00
Dan Stillman
a5d74ceb81 Test with /Applications/Firefox Unbranded.app by default on OS X 2016-08-13 03:35:43 -04: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
4e50b7ddc2 Increase default test timeout to 10 seconds on Travis
Maybe this will fix some of the intermittent failures...
2016-04-26 02:43:44 -04:00
Dan Stillman
300c8e8aea Leave default log level at 5 during test runs
Otherwise if debug output logging is enabled in the prefs nothing is
logged. Test output is still controlled by '-d n'.
2016-04-24 04:02:33 -04:00
Dan Stillman
4f54214f11 Disable auto-sync pref for tests
We don't want auto-sync to try to run during unrelated tests.
Additionally, even though the sync process wouldn't actually start due
to the absence of an API key (which is injected directly into the sync
functions for sync tests), since auto-sync kicks off after a one-second
delay on pane open, during tests the Zotero object has often been torn
down by the time the check code runs, producing spurious errors in the
console.
2016-04-01 02:49:50 -04:00
Dan Stillman
d826e6b0e8 Disable Firefox Health Check in tests 2016-03-23 04:29:38 -04:00
Dan Stillman
2d8f37967e Add -h flag to test runner to display help cleanly 2016-02-22 16:00:37 -05:00
Dan Stillman
3ac4203a75 Increase open files limit during tests
Mozilla file functions (OS.File.move()/copy(),
NetUtil.asyncFetch/asyncCopy()) can leave file descriptors open for a
few seconds (even with an explicit inputStream.close() in the case of
the latter), so a source installation that copies ~500 translators and
styles (with fds for source and target) can exceed the default 1024
limit.
2016-01-26 04:39:36 -05:00
Dan Stillman
ae69fbbd9b Disable Firefox extension signature checking during tests 2015-10-29 03:57:04 -04:00
Dan Stillman
2b8a5ba0b7 Disable extension signing check for test runs 2015-10-26 05:00:38 -04:00
Dan Stillman
213325636d Disable automatic backups during test runs 2015-06-11 16:06:32 -04:00
Simon Kornblith
3fc38d750b Use Zotero.Item.fromJSON() for saving from translators
Also:
  - Move some canonicalization of items returned by translators to
    Zotero.Translate
  - Make Zotero.Translate#translate return a promise
  - Add tests
2015-06-07 17:30:41 -04:00
Simon Kornblith
e10deedc7e Emit valid prefs.js even when debugging not enabled 2015-06-07 17:22:57 -04:00
Dan Stillman
b3555983d2 Fix -g test switch 2015-06-01 01:10:54 -04:00
Simon Kornblith
9bb01d737c Merge branch '4.0' into sjk/659 2015-06-01 00:03:20 -04:00
Dan Stillman
fd45032210 Add -g flag to run only tests matching a pattern (grep)
(Actually, it's only matching strings for me, not patterns, but according to
Mocha it's supposed to compile the patterns using RegExp.)
2015-05-31 03:37:45 -04:00
Dan Stillman
f3a6b41c1c Add -f test flag to stop after first test failure
(Mocha has a 'bail' config flag that's supposed to do this, but it doesn't seem
to work when passed to mocha.setup() (maybe because we're setting a custom fail
handler?), so this just calls abort() on the runner manually.)
2015-05-29 04:01:40 -04:00
Dan Stillman
8f2356f7c3 Delete test directory on exit when using -c 2015-05-27 21:42:37 -04:00
Aurimas Vinckevicius
2ebce91ecf Add -g flag to runtests.sh to generate test data
Add functions to generate sample data for various formats
* Zotero Web API JSON (Zotero.Item::toJSON)
* CiteProc-JS JSON
* Export translator JSON
* Direct serialization of Zotero.Item fields
Add a way to load sample data into DB from JSON
Add tests for loading sample data into DB
Add tests for automatically generated data
This will help us make sure that field mappings and data formats don't change
2015-05-26 16:04:55 -05:00
Dan Stillman
aa730bb3bd Merge branch '4.0'
Conflicts:
	chrome/content/zotero/fileInterface.js
	chrome/content/zotero/xpcom/translation/translate_item.js
	chrome/content/zotero/xpcom/utilities_internal.js
	chrome/content/zotero/zoteroPane.js
2015-05-23 18:26:32 -04:00