Commit Graph

24 Commits (071cca1d48920f24d202149895bb85b664aa025d)

Author SHA1 Message Date
Richard Hansen b8d07a42eb lint: Run `eslint --fix` on `bin/` and `tests/` 2020-11-24 20:06:12 +00:00
Richard Hansen 7df3ded66f lint: Put opening brace on same line as `function`
Normally I would let `eslint --fix` do this for me, but there's a bug
that causes:

    const x = function ()
    {
      // ...
    };

to become:

    const x = ()
    => {
      // ...
    };

which ESLint thinks is a syntax error. (It probably is; I don't know
enough about the automatic semicolon insertion rules to be confident.)
2020-11-24 20:06:12 +00:00
Richard Hansen b41d9762fa tests: Clear auth hooks before running import/export unit tests
Also fix some ESLint complaints.
2020-10-29 19:06:24 -04: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 048bd0f50d tests: Simplify API key reading
Also delete unused imports.
2020-10-08 22:50:18 +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
Richard Hansen 831528e8bc import: Allow import if pad does not yet exist 2020-10-05 18:48:16 +01:00
Richard Hansen 9a6f286441 tests: Always run the import unsupported file type test 2020-10-05 18:48:16 +01:00
Richard Hansen 2f17849b7b tests: Switch import/export tests to self-contained server
This makes it possible to test various settings combinations and
examine internal state to confirm correct behavior. Also, the user
doesn't need to start an Etherpad server before running these tests.
2020-10-05 18:48:16 +01:00
John McLear a51132d712
tests: test coverage for read only pad ids (#4364) 2020-09-27 19:12:11 +01:00
Richard Hansen 23131a501c tests: Rewrite import/export tests to use async and supertest 2020-09-26 10:46:16 +01:00
Richard Hansen 54c999fe83 tests: Factor out common skip checks 2020-09-26 10:46:16 +01:00
Richard Hansen 1c3c5b744c tests: Skip all import/export tests if `!allowAnyoneToImport`
Three of the four tests fail if `settings.allowAnyoneToImport` is
false. The fourth ("tries to import Plain Text to a pad that does not
exist") isn't particularly useful when `settings.allowAnyoneToImport`
is false: That test tests an import failure mode, and when
`settings.allowAnyoneToImport` is false the failure could be caused by
that instead of the expected cause.
2020-09-26 10:46:16 +01:00
Richard Hansen c148e673a8 tests: Use `this.skip()` when skipping tests 2020-09-26 10:46:16 +01:00
Richard Hansen 668373b80f tests: Fix abiword/soffice check 2020-09-26 10:46:16 +01:00
Richard Hansen 89de03795a tests: Delete unused imports and code 2020-09-26 10:46:16 +01:00
John McLear 12c05c20b2
bugfix/import: doc import bugfix (#4235) 2020-08-30 14:11:12 +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 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
John McLear ab8320d15b
WIP - Test Coverage: Import & Export include LibreOffice Test Coverage (#4163)
Runs on Travis
Will only run locally is ``allowAnyoneToImport`` and ``soffice`` or ``abiword`` is set.
2020-07-14 18:44:53 +01:00
John McLear 4497d37af9 tests: path to request require fix 2020-06-01 18:45:01 +00:00
John McLear 0dd9db4e99
tests: fix for fix of fuzz tests
Commenting out fuzz tests for now

Fixed up paths with request..  Pesky globals..
2020-06-01 19:26:49 +01:00
John McLear 71bffed190
tests: fix for fuzz tests (#4068) 2020-06-01 18:52:46 +01:00
John McLear dc11b85e62
tests: fuzzing, binary imports 2020-06-01 17:26:55 +01:00