Commit Graph

6233 Commits (94263aa896abdc9aeaa5c7f7965c52b3be4d006c)

Author SHA1 Message Date
webzwo0i 94263aa896 use older chrome version 2020-11-15 01:14:02 +01:00
webzwo0i 513d6ac764 add nativeEvents 2020-11-15 00:51:37 +01:00
webzwo0i 279623b255 typo 2020-11-15 00:47:11 +01:00
webzwo0i bfba928b53 add custom ff options 2020-11-15 00:44:14 +01:00
webzwo0i 2402634527 switch to firefox 2020-11-15 00:36:20 +01:00
webzwo0i 3deb4131c5 add tunnelIdentifier back in 2020-11-14 22:44:50 +01:00
webzwo0i 6001dac7b4 completly remove tunnelIdentifier 2020-11-14 22:37:28 +01:00
webzwo0i 7036af79dd move tunnelIdentifier out of sauce:options block 2020-11-14 22:32:32 +01:00
webzwo0i e776367794 define extendedDebugging and capturePerformance only in sauce:options 2020-11-14 22:10:49 +01:00
webzwo0i 60ac890fc8 test if it makes a difference 2020-11-14 21:40:53 +01:00
webzwo0i 53b589e900 selenium: capturePerformance:true 2020-11-14 20:50:39 +01:00
webzwo0i 3e26286c9d selenium: capturePerformance:false, extendedDebugging: true 2020-11-14 20:46:12 +01:00
webzwo0i 151765e76f selenium: capturePerformance:true 2020-11-14 20:39:34 +01:00
webzwo0i 12543c4e28 disable logs and performance logging 2020-11-14 20:19:56 +01:00
webzwo0i 35b94d91b3 try 2020-11-14 20:07:54 +01:00
webzwo0i e971de5740 try 2020-11-14 20:00:44 +01:00
webzwo0i c10e525c68 try 2020-11-14 17:30:41 +01:00
webzwo0i 21d6a8d7e3 selenium: try to enable native events 2020-11-14 17:21:18 +01:00
webzwo0i bd58fd15d4 simulate real keypress event 2020-11-14 17:18:42 +01:00
webzwo0i 536a6dce70 disable most tests 2020-11-14 17:17:17 +01:00
webzwo0i f1c3415de9 wd -> selenium-webdriver 2020-10-22 03:24:51 +02:00
webzwo0i 69c7033a86
tests: refactor some frontend tests (#4408)
* don't include sendkeys in index.html as it's included in helper.init
mocha opts: add default timeout and replace ignoreLeaks with checkLeaks,
as the former is deprecated

* introduce helper.edit to write to a pad

* add test to check if helper.edit() supports line numbers

* helper tests: waitFor/waitForPromise seem to be a little bit faster sometimes

* tests: refactor chat.js

* tests: refactor timeslider_numeric_padID

* tests: refactor timeslider_labels

* tests: refactor timeslider_follow

* ensure followContents is enabled, although it should be by default

* timeslider_follow: increase number of revision for Edge

* make textLines() depend on linesDiv()

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

* make linesDiv return standard Array

* use `contain` instead of `indexOf`

* more fixes from the review

* review fixes

* align waitFor and waitForPromise behaviour

* timeslider_follow: check if it's following to the correct lines

* lower expected waitFor/waitForPromise interval check

* disable responsivness and regression test in timeslider_follow

* timeslider_follow: fix Range detection

* more explicit test for linesDiv

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-10-21 18:43:17 +01:00
chandi 94cb000e8f
plugins: include more data within padUpdate hook (#4425)
* Including more data at pad update event

* docs: new context fields in padUpdate

Co-authored-by: Pedro Beschorner Marin <pedrobmarin@gmail.com>
2020-10-21 18:04:03 +01:00
webzwo0i 1e7a9e1791
tests: better timeslider follow contents (#4421) 2020-10-21 10:05:58 +01:00
Richard Hansen 0eb0a07914 Use an ellipsis instead of two periods 2020-10-20 11:02:37 +01:00
Richard Hansen 2379ade7e9 Move out pad.modals.reconnecttimer trailing space 2020-10-20 11:02:37 +01:00
Richard Hansen 734fe9c297 Use jQuery methods to build DOM elements 2020-10-20 11:02:37 +01:00
Richard Hansen a2554fff22 pad: Pop up an error message dialog box upon socket.io error 2020-10-20 10:01:49 +01:00
Richard Hansen 5b887396c3 pad: Check for null collabClient in socket.io event handlers 2020-10-20 10:01:49 +01:00
Richard Hansen b1acf6143a pad: Delete do-nothing `sendClientReady` wrapper 2020-10-20 10:01:49 +01:00
Richard Hansen a712ce457d gritter: Treat strings as text, not HTML
This forces users to use jQuery or DOM objects if they want
formatting, which helps avoid XSS vulnerabilities.
2020-10-20 10:01:49 +01:00
Richard Hansen 8463134125 pad: Improve rendering of uncaught exceptions
* Use jQuery to build the message HTML so that special characters in
    the error message, URL, etc. are properly escaped. This helps
    avoid XSS vulnerabilities.
  * Use bold text for the error message to make it stand out.
  * Add a line break between the error message and "in <url> at line
    <line>" so that the error message stands out more.
  * Use `<p>...</p>` instead of `</br>` to separate the parts of the
    popup.
  * Use CSS for spacing instead of `</br>`.
  * Grammar fixes (add a missing comma, "at" instead of "in").
2020-10-20 10:01:49 +01:00
Richard Hansen d35dbaaacc gritter: Accept jQuery or DOM objects for title and text
Teach Gritter to accept anything that jQuery's `.append()` method
accepts for the title and text of a popup message. This makes it
easier to safely build HTML messages with proper escaping of special
characters (to prevent XSS vulnerabilities).
2020-10-20 10:01:49 +01:00
Richard Hansen d680405f58 pad: Include .js URL in `/jserror` error report 2020-10-20 10:01:49 +01:00
translatewiki.net 2a8e11a49a Localisation updates from https://translatewiki.net. 2020-10-19 20:32:27 +02:00
translatewiki.net 105eb2651f Localisation updates from https://translatewiki.net. 2020-10-19 15:14:03 +02:00
Richard Hansen 1dba121aff tests: Tune `waitForPromise()` poll count test some more
Looks like the test machines can be quite slow, which causes noise in
the count.
2020-10-14 18:16:20 +01:00
Richard Hansen e0542f903a tests: Tune `waitForPromise()` poll count test
This should have been done in c222fc5d0b
but I forgot.
2020-10-14 16:59:03 +01:00
Richard Hansen 3e14016214 tests: Include the filename in the test output
Also some minor consistency cleanups.
2020-10-14 11:16:39 +01:00
Richard Hansen 50e402193b tests: `waitForPromise()` test improvements
* Avoid a false positive if a Promise that is expected to reject
    doesn't reject.
  * Use modern JavaScript language features: arrow functions,
    `const`/`let` instead of `var`.
  * Remove the tests that test Promise behavior.
  * Add new test that checks that it returns a Promise.
2020-10-14 10:38:52 +01:00
webzwo0i a3f062af96 tests: add waitForPromise method and test for it 2020-10-14 10:38:52 +01:00
webzwo0i 86c0648ede tests: don't force a callback in it, so we can use async in tests 2020-10-14 10:38:52 +01:00
Richard Hansen c222fc5d0b tests: Change `waitFor()` to check before first sleep
There are a few problems with sleeping before checking the condition
for the first time:

  * It slows down tests.
  * The predicate is never checked if the interval duration is greater
    than the timeout.
  * 0 can't be used to test if the condition is currently true.

There is a minor disadvantage to sleeping before checking: It will
cause more tests to run without an asynchronous interruption, which
could theoretically mask some async bugs.
2020-10-14 10:38:52 +01:00
Richard Hansen 8016bd225f tests: Teach `waitFor()` to reject if the predicate throws 2020-10-14 10:38:52 +01:00
Richard Hansen 262eb9af60 tests: Use default arguments for `helper.waitFor`
Now `helper.waitFor(fn, 0)` times out immediately (as expected in
tests) instead of waiting 1900ms.
2020-10-14 10:38:52 +01:00
Richard Hansen 16b0768a93 tests: Fix unchainable `helper.waitFor().fail()`
The `helper.waitFor()` function returns a jQuery Deferred object.
Deferred objects are supposed to have a `.fail()` method that is
chainable (it should return `this`). Before this change,
`helper.waitFor()` monkey-patched the `.fail()` method with a function
that returned `undefined`. Now the monkey-patched `.fail()` returns
the Deferred object.

Also modernize the code a bit.
2020-10-14 10:38:52 +01:00
Richard Hansen 4a25559a2d tests: Aggressively filter out non-.js files
This prevents errors when the directory contains Emacs backup files.
2020-10-14 10:38:52 +01:00
Richard Hansen 7f79d201e6 CSP: Move `index.html` inline code to separate `.js` file 2020-10-12 20:46:06 +01:00
translatewiki.net 09193150b6 Localisation updates from https://translatewiki.net. 2020-10-12 15:48:55 +02:00
Richard Hansen a4927095ae CSP: Disable the indexCustomInlineScripts hook 2020-10-11 20:31:00 +01:00