Commit graph

4274 commits

Author SHA1 Message Date
Richard Hansen
960c2c0c0d tests: Tweak mocha report spacing 2021-06-05 03:51:11 -04:00
Richard Hansen
b09b895ac7 tests: Remove border around iframe 2021-06-05 03:51:11 -04:00
Richard Hansen
e9f08bdd11 tests: Fix frontend test CSS selectors 2021-06-05 03:51:11 -04:00
Richard Hansen
76634eb6ff tests: Add missing <head> and <body> tags 2021-06-05 03:51:11 -04:00
Richard Hansen
d9782ac628 tests: Send frontend test spec list as JSON 2021-06-05 03:51:06 -04:00
Richard Hansen
20df34bb67 tests: Promisify helper.init() 2021-06-05 03:50:36 -04:00
Richard Hansen
c714ff1014 tests: Let Express handle errors when serving frontendTestSpecs.js
Express v4.x doesn't understand Promises so we have to manually catch
Promise rejections and pass the error object to `next()`.
2021-06-05 03:50:36 -04:00
Richard Hansen
e4f011df76 tests: Use require() to load frontend test specs
This makes core and plugin tests consistent with each other, makes it
possible to `require()` relative paths in spec files, simplifies the
code somewhat, and should make it easier to move away from
require-kernel.

Also:
  * Wrap plugin tests inside a `describe()` that contains the plugin
    name to make it easier to grep for a plugin's tests and for
    consistency with core tests.
  * Add "<core>" to the core test descriptions to make it easier to
    distinguish them from plugin tests.
2021-06-05 03:50:26 -04:00
Richard Hansen
d8eb79428f tests: Recurse under frontend spec dir 2021-06-05 03:49:13 -04:00
Richard Hansen
5d54c1657a tests: Redirect /tests/frontend/index.html to /tests/frontend/ 2021-06-05 03:49:12 -04:00
Richard Hansen
712b8c5769 tests: Redirect /tests/frontend to /tests/frontend/ 2021-06-05 03:49:12 -04:00
Richard Hansen
573da027e5 tests: Preserve query string when redirecting 2021-06-05 03:49:12 -04:00
Richard Hansen
9cba96e5e9 tests: Use relative paths for scripts 2021-06-05 03:49:12 -04:00
Richard Hansen
e144434571 tests: Use relative paths in helper.init()
This avoids problems if Etherpad is served under a path like
`/etherpad`.
2021-06-05 03:49:12 -04:00
Richard Hansen
dfd649dbe9 tests: Use a relative redirect for /tests/frontend
This avoids problems if Etherpad is served under a path like
`/etherpad`.
2021-06-03 15:10:23 -04:00
Richard Hansen
617267ce71 tests: Use plugin_defs to get plugin frontend test spec paths 2021-06-03 15:10:23 -04:00
Richard Hansen
1b7b96f57e tests: Avoid deprecated fs.existsSync() 2021-06-03 15:10:23 -04:00
Richard Hansen
ab824c728f tests: Move slashes to improve readability 2021-06-03 15:10:22 -04:00
Richard Hansen
1516bf473f tests: Delete unnecessary staticDir variable 2021-06-03 15:10:22 -04:00
Richard Hansen
d69345bb4e tests: Use map+reduce to improve readability 2021-06-03 15:10:22 -04:00
Richard Hansen
a8e77126e8 tests: Combine .map().filter().map() into single .map() 2021-06-03 15:10:22 -04:00
Richard Hansen
2414203434 tests: Remove unnecessary return 2021-06-03 15:10:22 -04:00
Richard Hansen
0852df74f1 tests: Unexport unnecessarily exported functions 2021-06-03 15:10:22 -04:00
Richard Hansen
ed44449639 tests: Pretty-print frontendTestSpecs.js to make troubleshooting easier 2021-06-03 15:10:22 -04:00
Richard Hansen
4fa9f9e9d8 tests: Use window.foo instead of var foo 2021-06-03 15:10:22 -04:00
Richard Hansen
aea2fb7448 tests: Rename specs_list to frontendTestSpecs 2021-06-03 15:10:22 -04:00
Richard Hansen
1be1b704f1 tests: Simplify iteration over frontend test specs 2021-06-03 15:10:22 -04:00
Richard Hansen
b85a040f13 tests: Reuse sanitizePathname when serving frontend specs 2021-06-03 15:10:22 -04:00
Richard Hansen
ade17490e0 tests: Combine frontend test file handlers 2021-06-03 15:10:22 -04:00
Richard Hansen
995e381243 tests: Only wrap *.js files in describe() 2021-06-03 15:10:22 -04:00
Richard Hansen
e1c2c963f0 tests: URL decode test spec pathnames
Express automatically URL decodes route parameters.
2021-06-03 15:10:22 -04:00
Richard Hansen
998e77ec25 tests: Switch to promisified readFile 2021-06-03 15:10:22 -04:00
Richard Hansen
6cf27a7133 tests: Use fs.promises instead of wrapping with util.promisify 2021-06-03 15:10:22 -04:00
Richard Hansen
f00f9aa14c tests: Avoid .then() inside async functions 2021-06-03 15:10:22 -04:00
Richard Hansen
d87b4e0c20 tests: Use async/await instead of returning Promises
This makes stack traces more useful.
2021-06-03 15:10:21 -04:00
Richard Hansen
0d9476529e sanitizePathname: Move to separate module to facilitate reuse 2021-06-03 15:10:21 -04:00
Richard Hansen
926da57e34 Minify: Refine sanitizePathname to avoid pathname traversal 2021-06-03 15:10:21 -04:00
translatewiki.net
3bca85286b Localisation updates from https://translatewiki.net. 2021-06-03 15:12:59 +02:00
translatewiki.net
8f63671ea9 Localisation updates from https://translatewiki.net. 2021-05-31 10:02:43 +02:00
translatewiki.net
a04089636c Localisation updates from https://translatewiki.net. 2021-05-27 15:37:31 +02:00
translatewiki.net
c426e939d1 Localisation updates from https://translatewiki.net. 2021-05-24 14:00:35 +02:00
Richard Hansen
6f2f20233f lint: Fix straightforward ESLint errors 2021-05-12 11:26:35 +02:00
Richard Hansen
59c03bde20 lint: Re-run eslint --fix 2021-05-12 11:26:35 +02:00
Richard Hansen
30eadad79d lint: Bump ESLint dependencies 2021-05-12 11:26:35 +02:00
webzwo0i
24929d3417 package.json: bump npm from 6.14.11 to 6.14.13 2021-05-07 14:58:57 +02:00
webzwo0i
10f00906f8 update package-lock.json 2021-05-07 14:58:57 +02:00
snyk-bot
ff245dbbeb fix: upgrade underscore from 1.13.0 to 1.13.1
Snyk has created this PR to upgrade underscore from 1.13.0 to 1.13.1.

See this package in npm:
https://www.npmjs.com/package/underscore

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-05-07 14:27:30 +02:00
translatewiki.net
4701cc43fa Localisation updates from https://translatewiki.net. 2021-05-07 10:50:38 +02:00
Richard Hansen
b040ebf419 Revert "PadMessageHandler: Use a Map for sessioninfos"
Switching to a Map broke ep_webrtc and maybe other plugins.

This reverts commit eeead46437.
2021-05-05 18:09:10 -04:00
webzwo0i
3c087af038 caretPosition: fix loading when iframe is hidden 2021-05-04 23:56:13 +02:00
Richard Hansen
8baacd514e remote_runner: Always call browser.quit() 2021-05-03 01:48:08 -04:00
Richard Hansen
081f739a8d remote_runner: Update browser list
Use latest versions of Chrome, Firefox, Safari, and Edge. Keep the old
Chrome version.
2021-05-03 01:48:08 -04:00
Richard Hansen
a7cd0a4b25 remote_runner: Avoid re-sending the same console text over and over 2021-05-03 01:48:08 -04:00
Richard Hansen
25275f2744 remote_runner: Treat no text as 0 lines, not 1 empty line 2021-05-03 01:48:08 -04:00
Richard Hansen
a17556b876 remote_runner: Avoid searching the full text for "FINISHED" 2021-05-03 01:48:08 -04:00
Richard Hansen
3409e3f5e6 remote_runner: Prevent Sauce errors from interrupting other tests 2021-05-03 01:48:08 -04:00
Richard Hansen
68b041c4fb remote_runner: Use newline instead of backslash n 2021-05-03 01:48:08 -04:00
Richard Hansen
713e57b451 remote_runner: Don't break long lines
Breaking lines makes it harder to read and search the test output.
2021-05-03 01:48:08 -04:00
Richard Hansen
7d75e0ef8f remote_runner: Simplify append() 2021-05-03 01:48:08 -04:00
Richard Hansen
bbb3046a87 remote_runner: Promisify 2021-05-03 01:48:08 -04:00
Richard Hansen
9059a55873 remote_runner: Improve readability of timeout duration 2021-05-03 01:48:08 -04:00
Richard Hansen
c803ec81f1 remote_runner: Handle webdriver errors 2021-05-03 01:48:08 -04:00
Richard Hansen
7f57b17b2e remote_runner: Use Error objects to convey pass/fail 2021-05-03 01:48:08 -04:00
Richard Hansen
4ec02a9af9 remote_runner: Simplify finished test check 2021-05-03 01:48:08 -04:00
Richard Hansen
b0e367a982 remote_runner: Simplify logging of console text 2021-05-03 01:48:08 -04:00
Richard Hansen
08856fe42e remote_runner: Move logIndex updates into printLog() 2021-05-03 01:48:08 -04:00
Richard Hansen
a12c475776 remote_runner: Use an options object to create webdriver object 2021-05-03 01:48:08 -04:00
Richard Hansen
925f789d4c remote_runner: Simplify logging 2021-05-03 01:48:08 -04:00
Richard Hansen
014e19cf7d remote_runner: await each browser test 2021-05-03 01:48:07 -04:00
Richard Hansen
1f3a831cc3 remote_runner: Avoid duplication in task list 2021-05-03 01:48:07 -04:00
Richard Hansen
59be8d5c05 remote_runner: Delete commented-out browsers
Also delete useless and incorrect browser comments.
2021-05-03 01:48:07 -04:00
Richard Hansen
a58fa4a2c5 tests: Add tests for SkipList.atOffset() 2021-05-03 01:42:03 -04:00
Richard Hansen
c00031a8d8 skiplist: Use Map.size to get number of nodes 2021-05-03 01:42:03 -04:00
Richard Hansen
1cdfe9193b skiplist: Convert _keyToNodeMap to a Map object 2021-05-03 01:42:03 -04:00
Richard Hansen
e2eb7327c2 skiplist: Sanity check inserted entries 2021-05-03 01:42:03 -04:00
Richard Hansen
9e2ef6ad5b skiplist: Move propagateWidthChange() to Node class 2021-05-03 01:42:03 -04:00
Richard Hansen
fc103e7f2a skiplist: Define a new Node class 2021-05-03 01:42:03 -04:00
Richard Hansen
9fc88f3601 skiplist: Convert point operations into Point methods 2021-05-03 01:42:03 -04:00
Richard Hansen
3c1be95e07 skiplist: Move point creation to a new Point class 2021-05-03 01:42:03 -04:00
Richard Hansen
8ae40e80f9 skiplist: Save entry in _insertKeyAtPoint() 2021-05-03 01:42:03 -04:00
Richard Hansen
0e424fa8c3 skiplist: Remove unnecessary newKey arg from _insertKeyAtPoint() 2021-05-03 01:42:03 -04:00
Richard Hansen
ab8c354f18 skiplist: Use ES6 class syntax
This makess it easier to examine state in dev console.
2021-05-03 01:42:03 -04:00
Richard Hansen
303fd297bd editor: Improve documentation comments 2021-05-03 01:42:03 -04:00
Richard Hansen
cbbcef8e90 AttributeManager: Add sanity checks 2021-05-03 01:42:03 -04:00
Richard Hansen
d40d59d9eb AttributeManager: Simplify logic 2021-05-03 01:42:03 -04:00
Richard Hansen
e3d32a26b6 skiplist: Delete unused methods 2021-05-03 01:42:03 -04:00
Richard Hansen
f650c3d73e editor: Delete unused PROFILER code 2021-05-03 01:42:03 -04:00
Richard Hansen
ab4e99f67a editor: Delete commented-out code 2021-05-03 01:42:03 -04:00
Richard Hansen
eeead46437 PadMessageHandler: Use a Map for sessioninfos
Maps are a bit more flexible, have clearer semantics, and have a
convenient `size` property.
2021-05-03 01:35:11 -04:00
Richard Hansen
14d4aadfe4 PadMessageHandler: Parallelize client updates
Multiple clients are updated in parallel, but multiple revisions sent
to a particular client are still sent sequentially.
2021-05-03 01:35:11 -04:00
Richard Hansen
770755debf PadMessageHandler: Assume sessioninfo stays valid during client update
...but add a try/catch around the message transmission just in case.
2021-05-03 01:35:11 -04:00
Richard Hansen
c85391862b PadMessageHandler: Avoid unnecessary property lookups 2021-05-03 01:35:11 -04:00
Richard Hansen
d5c6a44d9c PadMessageHandler: Improve documentation of sessioninfos 2021-05-03 01:35:11 -04:00
Richard Hansen
4c4415e14a PadMessageHandler: Register activePads metric only once 2021-05-03 01:35:11 -04:00
snyk-bot
6011d31b22 fix: upgrade underscore from 1.12.1 to 1.13.0
Snyk has created this PR to upgrade underscore from 1.12.1 to 1.13.0.

See this package in npm:
https://www.npmjs.com/package/underscore

See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-05-03 01:31:53 -04:00
Richard Hansen
8f236b8687 Minify: Avoid crash due to unhandled Promise rejection if stat fails 2021-05-03 01:26:49 -04:00
Richard Hansen
e8df643d75 Minify: Treat ENOTDIR like ENOENT when statting a file
This avoids an exception when require-kernel requests a path like
`existing-file.js/index.js`.
2021-05-03 01:26:48 -04:00
Richard Hansen
aaacbd3a7a Minify: Refactor requestURI() for readability 2021-05-03 01:26:48 -04:00
translatewiki.net
3a8d66ba6a Localisation updates from https://translatewiki.net. 2021-04-30 08:49:17 +02:00
translatewiki.net
3afc77dae7 Localisation updates from https://translatewiki.net. 2021-04-26 15:20:55 +02:00