Commit Graph

26 Commits (50c22f0ae41c3a39d9929a103ded578df719fcc0)

Author SHA1 Message Date
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
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
John McLear d1efa509e6 Revert "Revert "tests: updating mocha and refactoring the custom html reporter using events""
This reverts commit 2ce798339d.
2020-06-07 08:53:10 +00:00
John McLear 2ce798339d Revert "tests: updating mocha and refactoring the custom html reporter using events"
This reverts commit df1629c7b9.
2020-06-06 18:57:52 +00:00
Alexandre Magno df1629c7b9
tests: updating mocha and refactoring the custom html reporter using events 2020-06-03 10:54:55 +01:00
John McLear ff58897679 fix frontend tests 2014-11-27 16:58:04 +00:00
Peter 'Pita' Martischka 8d8487dfa6 Made jquery browser usable in testframework 2013-02-10 21:49:00 +00:00
johnyma22 83a2f3c1a9 stop using underscore.org 2012-10-30 17:43:33 +00:00
Peter 'Pita' Martischka f85da5483d added a plain text test reporter, will be good for the webdriver client to pick up test results 2012-10-28 13:16:41 +00:00
Peter 'Pita' Martischka cac27c864a load list of spec files from the server 2012-10-27 17:05:26 +01:00
Peter 'Pita' Martischka 06bebf257e run all tests 2012-10-27 16:40:54 +01:00
johnyma22 2db2683c98 an undo button test 2012-10-09 00:52:46 +01:00
johnyma22 c9dd620e2a the first stages of a clear authorship color test 2012-10-09 00:24:19 +01:00
Peter 'Pita' Martischka 0927b13f78 started button_indention test 2012-10-08 21:04:09 +01:00
Peter 'Pita' Martischka 6fefadee88 move sendkeys to lib folder 2012-10-08 18:54:03 +01:00
Peter 'Pita' Martischka 82b4a953ee new index.html 2012-10-08 18:49:40 +01:00
Peter 'Pita' Martischka bd47b6c40b the monospace test works now 2012-10-08 14:13:35 +02:00
Peter 'Pita' Martischka ca6ebd6151 major restructering of the front end test framework 2012-10-08 00:34:29 +02:00
johnyma22 66a25adf62 put all scripts back into index 2012-10-04 21:17:16 +01:00
johnyma22 7eecfa17b7 test for basic indent and outdent, needs more work 2012-10-04 21:02:34 +01:00
johnyma22 edc8ff6a41 adding other tests back to index 2012-10-04 20:44:42 +01:00
Peter 'Pita' Martischka 95ce0aaba8 merged remote feature/frontend-tests 2012-10-04 14:35:25 +02:00
johnyma22 24988d659c This test should work, Peter, why does this test not work? 2012-10-03 21:55:23 +01:00
johnyma22 38ef46449b add delete stroke test to index page of /tests/frontend 2012-10-03 21:26:48 +01:00
johnyma22 649a28b6c6 first user contributed test, note the two files that needed to be edited, this kinda sucks 2012-10-02 15:32:31 +01:00
Peter 'Pita' Martischka ba4ebbba3b Setted up an enviroment for frontend tests, first steps 2012-10-02 00:35:43 +01:00