38 Commits

Author SHA1 Message Date
Kristjan ESPERANTO
d276a7ddb9
Use template literals instead of string concatenation (#3066)
We have used it inconsistently till now. Template literals are more
modern and easier to maintain in my opinion.

Because that's a large amount of changes, here's a way to reproduce it:
I added the rule `"prefer-template": "error"` to the `.eslintrc.json`
and did an autofix. Since this caused a new problem in line 409 of
`newsfeed.js`, I reversed it in that line and also removed the rule from
the eslint config file.

The rule is described here:
https://eslint.org/docs/latest/rules/prefer-template

Note: I've played around with some other linter rules as well, and some
seem to point to some specific, non-cosmetic, issues. But before I dive
even deeper and then introduce even bigger and hardly understandable
changes at once, I thought I'd start with this simple cosmetic rule.
2023-03-19 14:32:23 +01:00
buxxi
f25abfd2f8
Make the e2e tests wait for the app to start and close before running next test (#2952)
When trying to debug why the tests broke for
https://github.com/MichMich/MagicMirror/pull/2946 I found that the tests
does not wait for the app to start and close. So if the startup isn't
blocking that would fail.

So I added a callback for `close()` too and converted them to promises
for the `startApplication()` and `stopApplication()` and updated all the
e2e tests to await both. Will try to refactor all these callbacks to
promises in a later PR.
2022-10-29 22:34:17 +02:00
Veeck
a328ce537f
Cleanup test directory (#2937)
Moves files around and renames some so that the structure is cleaner and
more consistent
2022-10-07 12:16:37 -05:00
Karsten Hassel
f04d578704
improve tests (#2923)
use es6 syntax in all tests, split weather tests, remove callbacks
2022-10-04 10:15:24 +02:00
Karsten Hassel
0023c64d59 use internal fetch function of node instead external node-fetch library if node version >= v18 2022-05-27 19:46:28 +02:00
Karsten Hassel
6595b6a44f refactor global-setup.js 2021-09-25 23:45:34 +02:00
Karsten Hassel
89e803ee42 update without_modules.js and env_spec.js 2021-09-25 22:12:53 +02:00
Karsten Hassel
9969fede35 refactor e2e 2021-09-16 23:02:17 +02:00
Karsten Hassel
236bf6e0fc silence logger for tests, use modulePaths for e2e 2021-09-13 23:55:41 +02:00
Karsten Hassel
974de179e0 refactor tests in 3 categories unit, e2e and electron 2021-09-13 23:07:34 +02:00
veeck
2e44e1626d Remove unused variables 2021-07-14 10:41:29 +02:00
Karsten Hassel
a5f7c946cc jest setup changes, increase setMaxListeners, disable console.log in tests/unit/global_vars 2021-06-12 21:26:08 +02:00
karsten13
1a244726aa run prettier 2021-06-11 22:24:21 +02:00
Karsten Hassel
65a8cb9ddb remove unused references 2021-06-11 00:32:54 +02:00
Karsten Hassel
0e14d3d6e8 snapshot e2e 2021-06-09 00:19:43 +02:00
Karsten Hassel
67011c0c32 snapshot e2e 2021-06-08 00:47:40 +02:00
rejas
d736dd92be Use es6 notation in tests 2021-04-18 14:51:28 +02:00
Karsten Hassel
f09c54184a moved tests to fetch, run prettier 2021-03-02 21:26:25 +01:00
rejas
efec49bb47 Use es6 notations 2021-02-11 21:22:03 +01:00
Veeck
abb5dc5739 Run prettier over ALL files once
No other changes done in this commit
2020-05-11 22:22:32 +02:00
rejas
b9d19cfcb4 First round of undef fixes 2020-05-03 12:40:48 +02:00
Rodrigo Ramírez Norambuena
6e7edd9824 Revert error logging introduced in 1e97b5c 2020-01-19 08:50:37 -03:00
Rodrigo Ramírez Norambuena
cce57c7229 Fix the vendor_spec test:
This change set after startApplication the configuration to run this
test.

The previous statement when e2e are running using --recursive the
MM_CONFIG_FILE was setting by the test running before this one.
2020-01-19 04:06:21 -03:00
Kurtis Blankenship
8aa745471b fix: Issue #1798 - fixing recurrent calendar events crosstime DST 2020-01-17 22:53:14 -06:00
Sam Detweiler
4da6e3ecee add test for error on 200 rc test path 2019-12-10 11:29:26 -06:00
Michael Teeuw
9db54831c8
Merge pull request #1766 from fewieden/feature/automated-weather-tests
Automated tests for new weather module
2019-09-11 16:45:28 +02:00
Felix Wiedenbach
aad03a74c5 fix test path and eslint 2019-09-11 15:58:51 +02:00
Rodrigo Ramírez Norambuena
1e97b5c27a Prevent error CI build for 404 Test vendors 2019-09-10 18:24:45 -03:00
Rodrigo Ramírez Norambuena
3a7cfe3208 Enable Test e2e/vendor_spec.js 2019-07-26 02:21:56 -04:00
Rodrigo Ramírez Norambuena
f079cdad64 Merge remote-tracking branch 'origin/develop' into tests-404-vendors 2019-07-26 02:19:10 -04:00
rejas
835668d96d Add eslint semi rule 2019-06-05 10:23:58 +02:00
rejas
702b98f510 Cleanup imports 2019-06-04 10:43:06 +02:00
Rodrigo Ramírez Norambuena
0ba125c2d7 Disabled tests of vendor_spec:
Sometimes these getting failed in Travis.
2017-08-05 02:40:03 -04:00
Rodrigo Ramírez Norambuena
9d7b0487d5 Change hooks for vendor_spec:
Use the hooks before and after in the vendor_spec instead of use beforeAll and
afterAll in the e2e test to prevent failure in CI.
2017-07-25 20:24:04 -04:00
Bas van Wetten
203e1cc9b9 Implemented requested change PR #2
Moved tests/e2e_new to tests/e2e folder
2017-07-24 22:08:12 +02:00
Rodrigo Ramírez Norambuena
07533f5658 Activate e2e test in Travis and desactivate failed test in CI:
- dev_console
 - vendor_spec
2017-07-20 00:34:20 -04:00
Rodrigo Ramírez Norambuena
f34407fc43 Add 404 test HTTP code for vendors 2017-04-18 23:44:50 -03:00
Rodrigo Ramírez Norambuena
7918448be2 Add test for vendor
This test get all vendor defined.  Create a get request http each vendor
and expect the 200 HTTP code.
2017-03-18 13:19:31 -03:00