Commit graph

7613 commits

Author SHA1 Message Date
Richard Hansen
6f17d2f913 CI: Use Windows to build the Windows zip
npm might do something different on Windows when setting up the
executables in `src/node_modules/.bin`.
2021-02-23 22:40:15 -05:00
Richard Hansen
dabff9be77 run_cmd: Fix PATH debug log message 2021-02-23 21:41:32 -05:00
John McLear
c7511b2f2e tests: change timeout on bold and embed_value test to support Win10 FF84 2021-02-23 19:53:03 +00:00
John McLear
72d9c8fef9 tests: Use more modern relevant Firefox version in Sauce Labs
Firefox 52 has issues with rendering SVG animations which caused random tests to fail.  Less than 2% of total Firefox users now use Firefox 52 so we're safe to drop testing for it.
2021-02-23 19:53:03 +00:00
John McLear
1a9709bb87
Update README.md 2021-02-23 07:24:39 +00:00
John McLear
8364546e70 tests: fix importexport tests
The testing approach was redone to fix numerous issues:
  * Even if the tests had been working, none of them would have caught
    https://github.com/ether/etherpad-lite/issues/4808 because they
    didn't exercise the client-side import logic. Now they do.
  * Follow-up logic was not in the `helper.waitFor()` callback like it
    should have been. Now the code uses `async` and `await` to ensure
    proper execution order.
  * All `$.ajax()` calls used `async: false`. Now they're properly
    asynchronous.
  * The `helper.waitFor()` condition callbacks threw instead of
    returning false.
  * The string comparisons didn't allow for different attribute
    order (e.g., `<ol start="1" class="list-number1">` vs. `<ol
    class="list-number1" start="1">`). Now `Node.isEqualNode()` is
    used to reduce fragility. (`Node.isEqualNode()` is not perfect, so
    the tests are still a bit fragile: If class names or style strings
    are in a different order then `Node.isEqualNode()` will return
    false even if the nodes are semantically equivalent.)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-22 18:20:24 -05:00
Richard Hansen
e9cb1692eb CI: Disable import/export rate limiting for frontend tests 2021-02-22 18:20:24 -05:00
Richard Hansen
644c8e6195 CI: Disable frontend admin tests for non-admin workflow 2021-02-22 18:20:24 -05:00
Richard Hansen
a354b03633 CI: Leave log level at INFO for frontend tests 2021-02-22 18:20:24 -05:00
Richard Hansen
3ca1589885 Revert "tests: fix importexport frontend tests (#4827)"
I'm going to split this into separate commits.

This reverts commit 9b03f8f6ab.
2021-02-22 18:19:48 -05:00
translatewiki.net
f246d1b476 Localisation updates from https://translatewiki.net. 2021-02-22 16:37:36 +01:00
John McLear
0ac33d2085 tests: timeslider_follow increase test timeout for firefox. 2021-02-22 14:30:19 +00:00
Richard Hansen
1908bedabe caretPosition: Clarify comment in getPosition() 2021-02-22 11:25:45 +00:00
Richard Hansen
91955609af caretPosition: Delete pointless logic in getPosition()
The `line` variable is unconditionally overwritten later, and the
function calls do not have side effects, so it is safe to delete this
logic.
2021-02-22 11:25:45 +00:00
Richard Hansen
1dbdaf93d7 caretPosition: Delete no-op Range.detach() call 2021-02-22 11:25:45 +00:00
Richard Hansen
5e731dfbfd caretPosition: Delete unused var in getPosition() 2021-02-22 11:25:45 +00:00
Richard Hansen
02fd0048bf caretPosition: Invert condition in getPosition() for readability 2021-02-22 11:25:45 +00:00
Richard Hansen
773959ec57 CI: Delete old Sauce Connect logic 2021-02-22 11:25:21 +00:00
John McLear
9b03f8f6ab
tests: fix importexport frontend tests (#4827)
* CI: Leave log level at INFO for frontend tests

* CI: Disable frontend admin tests for non-admin workflow

* CI: Disable import/export rate limiting for frontend tests

* tests: fix importexport tests

The testing approach was redone to fix numerous issues:
  * Even if the tests had been working, none of them would have caught
    https://github.com/ether/etherpad-lite/issues/4808 because they
    didn't exercise the client-side import logic. Now they do.
  * Follow-up logic was not in the `helper.waitFor()` callback like it
    should have been. Now the code uses `async` and `await` to ensure
    proper execution order.
  * All `$.ajax()` calls used `async: false`. Now they're properly
    asynchronous.
  * The `helper.waitFor()` condition callbacks threw instead of
    returning false.
  * The string comparisons didn't allow for different attribute
    order (e.g., `<ol start="1" class="list-number1">` vs. `<ol
    class="list-number1" start="1">`). Now `Node.isEqualNode()` is
    used to reduce fragility. (`Node.isEqualNode()` is not perfect, so
    the tests are still a bit fragile: If class names or style strings
    are in a different order then `Node.isEqualNode()` will return
    false even if the nodes are semantically equivalent.)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-22 10:40:38 +00:00
John McLear
ed8a8eb590
Rename lgtm.yml to .lgtm.yml 2021-02-22 10:06:13 +00:00
John McLear
c6cd4c38fd
Update CHANGELOG.md 2021-02-22 09:46:14 +00:00
Richard Hansen
d9c2778d17 plugins: Better fix for LGTM security warning 2021-02-22 09:43:20 +00:00
John McLear
a102bbfbef
badges: color fix 2021-02-22 09:37:30 +00:00
John McLear
b7958b915a
docs: Badge polish 2021-02-22 09:28:37 +00:00
John McLear
0f16e518ff
api: drop JSONP (#4835)
* api: drop JSONP

* docs: drop JSONP

* tests: drop JSONP

* api: remove isValidJSONPName require
2021-02-22 09:10:02 +00:00
Richard Hansen
85231cb774 tests: More descriptive Sauce Labs name 2021-02-22 03:36:12 -05:00
webzwo0i
2994ef3c3c tests: try all supported node versions 2021-02-22 03:36:12 -05:00
webzwo0i
29afb91b3e tests: delay setting up saucelabs tunnel 2021-02-22 03:36:12 -05:00
Richard Hansen
6198e92706 tests: Pass --legacy-peer-deps flag to work around npm v7 bug
This flag is unknown to npm v6, but npm v6 silently ignores unknown
flags.
2021-02-22 03:36:12 -05:00
Richard Hansen
588b73f366 tests: Install deps after installing plugins 2021-02-22 03:36:12 -05:00
Richard Hansen
5ea66701f7 tests: Use --no-save when installing plugins on Windows 2021-02-22 03:36:12 -05:00
webzwo0i
14a9749b75 tests: add assert helper for supporting node 10.x 2021-02-22 03:36:12 -05:00
John McLear
ce83181ac3
Lgtm bugfixes (#4838)
* code tidy up: always evaluates

* tidy up: is always true

* tidy up: remove unused code

* always true/false variables

* unused variable

* tidy up: remove unused code in caretPosition.js

* for squash: Revert "tidy up: remove unused code in caretPosition.js"

The `if` condition was previously always true, so the body should be
preserved. If the body is preserved, other logic can be deleted. I
opened PR #4845 to clean it all up.

This reverts commit 75b03e5a7dc1ff9a8728ed2341fd9fe970d0615f.

* for squash: simplify

* for squash: Explain that the getter is used for its side effects

It's very weird to call a getter without using its return value. Add a
comment explaining why this is done so that the reader doesn't get
confused.

* for squash: Revert "tidy up: remove unused code"

The exception test was the purpose of the code.

This reverts commit 85153b167613b2513fff99e22b8ded8ea1e4547b.

* for squash: Log the tsort results

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-02-22 08:26:35 +00:00
Stefan
de186fbe36
Update node in docker to version 14 (#4844) 2021-02-22 01:34:34 -05:00
John McLear
40d7480d5b lint: padaccess.js 2021-02-21 21:09:02 -05:00
John McLear
029729a386 lint: Settings.js 2021-02-21 21:09:02 -05:00
John McLear
435562299f lint: NodeVersion.js 2021-02-21 21:09:02 -05:00
John McLear
7352dc7571 lint: ImportEtherpad.js 2021-02-21 21:09:02 -05:00
John McLear
613c7d8545 lint: ExportTxt.js 2021-02-21 21:09:02 -05:00
John McLear
d2359be08b lint: ExportHtml.js 2021-02-21 21:09:02 -05:00
John McLear
5718c8b360 lint: AbsolutePaths.js 2021-02-21 21:09:02 -05:00
John McLear
b1614f0592 lint: i18n.js
Partial, still 3 more to do that are slightly higher hanging that can get done.
2021-02-21 21:09:02 -05:00
John McLear
586af5e16e lint: padurlsanitize.js 2021-02-21 21:06:38 -05:00
John McLear
86c938cae2 lint: openapi.js 2021-02-21 21:06:38 -05:00
John McLear
25d4faddd9 lint: SocketIORouter.js 2021-02-21 21:06:38 -05:00
John McLear
5201cb717f lint: PadMessageHandler.js 2021-02-21 21:06:38 -05:00
John McLear
d67f170c46 lint: eejs/index.js 2021-02-21 21:06:38 -05:00
John McLear
3ed4ac649c lint: PadManager.js 2021-02-21 21:02:59 -05:00
John McLear
6b6201b448
null link on plugins and noopener / noreferrer
Resolves a (non) security issue brought up by LGTM but I think the noopener and norefferer are good shouts
2021-02-21 19:30:39 +00:00
John McLear
2c763fb4d1 Delete dirty-db-cleaner.py 2021-02-21 18:07:20 +00:00