Commit Graph

85 Commits (2c80c1f2dab5c7dc6daf1a375faedbd1acc9ae8a)

Author SHA1 Message Date
John McLear 915849b319
Low hanging lint frontend tests (#4695)
* lint: low hanging specs/alphabet.js

* lint: low hanging specs/authorship_of_editions.js

* lint: low hanging specs/bold.js

* lint: low hanging specs/caret.js

* lint: low hanging specs/change_user_color.js

* lint: low hanging specs/change_user_name.js

* lint: low hanging specs/chat.js

* lint: low hanging specs/chat_load_messages.js

* lint: low hanging specs/clear_authorship_colors.js

* lint: low hanging specs/delete.js

* lint: low hanging specs/drag_and_drop.js

* lint: low hanging specs/embed_value.js

* lint: low hanging specs/enter.js

* lint: low hanging specs/font_type.js

* lint: low hanging specs/helper.js

* lint: low hanging specs/importexport.js

* lint: low hanging specs/importindents.js

* lint: low hanging specs/indentation.js

* lint: low hanging specs/italic.js

* lint: low hanging specs/language.js

* lint: low hanging specs/multiple_authors_clear_authorship_colors.js

* lint: low hanging specs/ordered_list.js

* lint: low hanging specs/pad_modal.js

* lint: low hanging specs/redo.js

* lint: low hanging specs/responsiveness.js

* lint: low hanging specs/select_formatting_buttons.js

* lint: low hanging specs/strikethrough.js

* lint: low hanging specs/timeslider.js

* lint: low hanging specs/timeslider_labels.js

* lint: low hanging specs/timeslider_numeric_padID.js

* lint: low hanging specs/timeslider_revisions.js

* lint: low hanging specs/undo.js

* lint: low hanging specs/unordered_list.js

* lint: low hanging specs/xxauto_reconnect.js

* lint: attempt to do remote_runner.js

* lint: helper linting

* lint: rate limit linting

* use constructor for Event to make eslint happier

* for squash: lint fix refinements

* for squash: lint fix refinements

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-01 20:23:14 +00:00
Richard Hansen 107942ad8a lint: Rerun `eslint --fix` to nuke trailing function call commas
eslint-config-etherpad 1.0.11 changed the comma-dangle rule to
prohibit trailing commas for function arguments. See:
673ab07acf
Re-run the automated fixes to apply the rule change.

This also fixes a few lint issues in changes that were made after
`eslint --fix` was originally run.
2020-11-25 13:09:14 -05:00
webzwo0i b98aaf4904
backend tests: change loglevel to WARN (#4514) 2020-11-25 02:20:50 -05:00
Richard Hansen b8d07a42eb lint: Run `eslint --fix` on `bin/` and `tests/` 2020-11-24 20:06:12 +00:00
webzwo0i b71b606774
tests: Switch from Travis to Github Actions
Travis placed an unnecessary breaking restriction on our tests and failed to respond within 72 hours to our complaint.  This has forced us to introduce Github Actions to manage our testing.  This is hopefully a temporary measure while Travis either gets itself together or we find a non-Github requirement.
2020-11-24 18:12:41 +00:00
Richard Hansen 1d491c0059 tests: Clean up Travis runner scripts
* Avoid bashisms.
  * Simplify `sed` of `settings.json`.
  * Wrap long lines.
  * Define and use the conventional log functions.
  * Quote variable expansions.
2020-11-22 09:22:14 +00:00
Richard Hansen c9eb4c72a5 tests: Kill Etherpad and wait for it to exit 2020-11-22 09:22:14 +00:00
Richard Hansen 9abb77e899 tests: Set loglevel to WARN instead of suppressing stdout 2020-11-22 09:22:14 +00:00
John McLear 06e0ff3cd3
tests: Test against Safari 13, drop Safari 12 coverage. 2020-11-19 09:06:57 +00:00
webzwo0i f6aed0c9cb
Fix truncation in travis (#4479)
* log to travis every five seconds
* travis: kill etherpad process after tests
2020-11-10 06:59:50 +01:00
webzwo0i b67c9cc136
tests: Speed up and fix travis (#4453)
Various test runner fixes.
2020-10-30 10:40:11 +00:00
John McLear 92d4b8b649
tests: re-enable docker tests in travis (#4395)
Thanks to node10 having better support we can re-enable these tests.
2020-10-06 14:21:09 +01:00
Richard Hansen a8cf434d1d import: Replace the `allowAnyoneToImport` check with `userCanModify`
This reduces the number of hoops a user or tool must jump through to
import.
2020-10-05 18:48:16 +01:00
John McLear 8919608d45 tests: disable a version of safari for now as its too buggy on sauce labs 2020-09-27 23:13:29 +01:00
John McLear 53b80d6280
tests: adding a check before finishing responsiveness test - allowing load test to run for 25 instead of 30 seconds to facilitate travis performance. (#4363)
The goal of this PR is to make tests break less frequently.  It is yet confirmed if this has worked but time will tell.
2020-09-27 15:13:55 +01:00
webzwo0i 85f52a2f23
tests: Plugin backend tests in ci (#4314) 2020-09-18 16:28:42 +01:00
webzwo0i d30364d3de
tests: make it more clear that test duration exceeded (#4237) 2020-08-30 16:41:12 +01:00
webzwo0i 1b6a9d8be0
tests: Fix frontend tests (#4188), ugly work around for "Pad never loaded" (#4200)
* remote_runner.js: fix drain call (cf.
https://github.com/caolan/async/blob/master/CHANGELOG.md#breaking-changes)

* dont wait 30 seconds after remote_runner.js returned

* timeout frontend tests after 9.5 minutes to prevent travis from silently stop them

* log when not all tests finished

* prevent killTimeout to happen after last test

* log server messages to console

* remote_runner will take some time to setup sl, so this second is not necessary

* dont write to global mocha variable

* mochas `test end` event is not called when a before/beforeEach-hooks
failed, so we should only use pass/fail/pending-hooks for logging.
also some cruft removed

* pass test in `pending`-event handler

* remove some more cruft in tests/frontend/runner.js

* frontend tests: clarify why stats.tests and total differ

* move killTimeout to pass/fail/pending instead of `test end` to guarantee that it is run

* delete killTimeout on test end to prevent misleading log message

* unused variable

* fix regex

* unlikely edge case

* ensure `allowed test duration exceeded` message is printed for the last runner

* get rid of jquery.iframe.js, currently no support for IE<9

* retry up to 3 times when pad could not be loaded

* Call the logging code in stopSauce in a callback for `browser.quit()`.
This should fix cases like
https://app.saucelabs.com/tests/cb8225375d274cbcbb091309f5466cfd
Travis received all the logs and remote_runner.js exits, but there never
is a DELETE command for webdriver.
2020-07-28 19:57:33 +01:00
Daniel Krol 859a128c54
Command line argument for chromium test for fake webrtc (#4199) 2020-07-28 10:33:49 +01:00
John McLear 40014d8230
Rate limit Socket IO communication - WIP (#4036)
Includes settings
    Includes i18n
    Includes a nice notification
    Disconnects on rate limit
    Includes feeding into metrics/stats
    Include console warn to server console.
2020-07-19 22:44:24 +01:00
John McLear 4f5cf2dc63
tests and bugfix: test coverage and fix for 4165 - bad HTML export of list items (#4180)
Also fix for test max value for ratelimiter
2020-07-19 16:31:13 +01:00
John McLear f4e5e9b750 tests: make target versions inline with #4162 part 3 2020-07-17 12:40:13 +00:00
John McLear c288fbe2e0 tests: make target versions inline with #4162 part 2 2020-07-17 12:28:24 +00:00
John McLear fad3830097 tests: make target versions inline with #4162 2020-07-17 11:58:32 +00:00
John McLear 7b0fd4fb29
Bugfix / tests: Travis use LibreOffice PPA and fix import /export tests for good. (#4166)
Just final bits of test coverage for import/export of LibreOffice.  It turns out Travis by default installs an old LO that doesn't support PDF import.  To remedy that I use the LO PPA and also strict install the PDF import support.

Still to do in a future date is check LO exported contents includes expected strings, for now it just checks output length looks sane.
2020-07-16 10:46:45 +01:00
webzwo0i 2c8fb99be8
frontend test improvements (#4161)
* update sauce connect proxy to 4.6.2

* include tunnelIdentifier in webdriver capabilities

* add platform in console output

* include extendedDebugging in webdriver capabilities to get browser console logs

* informative: add comment for timeouts during tests

* When the killTimeout in runner.js stops the tests, it's an failure.

* do not wait a hardcoded amount of 10 seconds for files to be minified.
this setup time is not included in the total time of the first test.

* run 4 browsers at a time during frontend testing

* try to include test.speed in output

* time is in test.duration, not test.speed

* frontend tests: 6 sessions in parallel, add OSX 10.14-safari and Windows7-firefox, pin all browsers instead of use latest

* typo
2020-07-13 15:12:39 +01:00
webzwo0i bbee833b89
Fix backendRunner's exitcode (#4134)
* remove minification because it's not necessary for backend and contentcollector tests

* run all tests regardless of errors
2020-06-27 20:10:55 +01:00
John McLear c5584fb5b4
editor: outdent on ol removal (#4088) 2020-06-07 09:51:12 +01:00
John McLear 71a1f28ab9 tests: remote parallel runners, they defo causing issues at the moment ;( 2020-06-07 02:23:56 +00:00
John McLear e0ae5010ad tests: testing parallel runners 2020-06-06 18:38:50 +00:00
John McLear a4bdcc3392
tests/editor/ul/li/ol/import/export: Introduce contentcollector.js tests & various OL/UL/LI related bugfixes
1. Introduce contentcollector.js backend tests
1. Fix issue with OL LI items not being properly numbered after import
1. Fix issue with nested OL LI items being improperly numbered on export
1. Fix issue with new lines not being introduced after lists in on import #3961
1. Sanitize HTML on the way in (import)
1. Fix ExportHTML CSS because it needs to support OL > LI > OL not OL > OL [The latter being the correct format]
1. Fix backend tests.
2020-06-05 20:54:16 +01:00
John McLear 4f37865d97 tests: allow tests to run for more than 10 minutes because browsers are slow on saucelabs 2020-05-31 20:11:33 +00:00
John McLear c9c2adbdb3 tests: sensible value for load tester to run at 2020-05-30 21:58:39 +00:00
John McLear 1b772c449d tests: run bcakend tests for 50 seconds instead of 60 because this is the point of optimization 2020-05-30 20:06:34 +00:00
John McLear f629f9f890 tests: change binary used for load testing 2020-05-30 18:28:33 +00:00
John McLear 2844224acb tests: backend tests tweak 2020-05-30 18:22:24 +00:00
John McLear 04cbebc165 runner load test config 2020-05-30 18:13:57 +00:00
John McLear 66aff57d87
tests: introduce automated load testing (#4066) 2020-05-30 18:51:14 +01:00
John McLear 520b20a3ca
tests: Only run one frontend test at a time (#4064) 2020-05-30 01:05:06 +01:00
John McLear 8c669682c4
tests: remove another setTimeout for Edge tests.. 2020-05-29 21:06:38 +01:00
John McLear e557723c8e
Renaming auto connection test 2020-05-29 17:52:00 +01:00
John McLear 59aab3676d
Revert "testing: New chrome testing hack slash workaround (#4055)" (#4057)
This reverts commit 59b54b4772.
2020-05-29 17:50:11 +01:00
John McLear 59b54b4772
testing: New chrome testing hack slash workaround (#4055)
* testing this

* worth isolating
2020-05-29 17:34:32 +01:00
John McLear c6b5846172
tests: Fix backend testing which were always partially broken due to cache (#4053) 2020-05-29 13:26:34 +01:00
John McLear d8e067a5f9
tests: Resolve Gateway timeout during automated tests by adding delay after minify request
* Remove npm cache from Travis, this was causing a world of pain.
* Remove the broken line attribute tests.
* Do a HTTP get against Etherpad to begin minification.
* Wait 10 seconds after minification before running tests.
2020-05-29 12:28:31 +01:00
John McLear 93180c287b
tests: in Travis, also run the backend tests
This change introduces automatic execution of the backend tests in Travis.

Implements #2351.
2020-04-03 03:27:05 +02:00
muxator 4a17443a2e tests: future proof travis/runner.sh and make it more robust
This change only slightly modifies the bahaviour of travis/runner.sh, but:

1. speeds up the tests, because it does not install dependencies before running
   them. Dependencies are already installed by .travis.yml in its "install"
   section;
2. if for some reason Etherpad does not start, there is a sudden failure,
   instead of launching the front end tests anyway, and then having to wait 10
   minutes for them to time out;
3. it is compatible with a different way of installing etherpad dependencies
   ("npm ci" instead of "npm install"), whereas the previous one broke. This
   will probably be introduced in a while, so this change future-proofs for it
   (see #3778).
4. it is more robust, because it detects more reliably the paths, and changes
   between them correctly;

Please note that the script now requires bash instead of a generic posix shell.
This may break on platforms which default to a different shell (FreeBSD, MacOS?)
2020-03-29 23:59:28 +02:00
John McLear 8f2ad7a0e8 tests: use latest Safari in Saucelab front end tests
I verified that, as of today, "latest" Safari version works on Saucelabs.
2020-03-26 23:26:25 +01:00
John McLear 88d05d3e66 tests: configure the OS/Browsers versions on which tests will be run
For all the supported operating systems, the latest version of each browser is
supported, with the Exception of Win 8 / IE 10, which has an explicit version
pinned.
2020-03-23 23:51:51 +01:00
John McLear 3085f46f32 tests: explicit tunnel version URI in sauce_tunnel.sh
For an explanation, see bf0bb58c70.
2020-03-23 23:51:51 +01:00