Commit Graph

235 Commits

Author SHA1 Message Date
Joe Previte 83cfbf82cf
feat: increase timeout for playwright tests 2021-04-19 10:40:59 -07:00
Joe Previte faaa0a9e60
feat(testing): add e2e tests for password 2021-04-19 10:40:59 -07:00
Joe Previte ebbabc6e04
refactor(testing): combine loginPage with login 2021-04-19 10:40:58 -07:00
Joe Previte 58e17c5e50
feat(testing): add tests for RateLimiter 2021-04-19 10:40:58 -07:00
Joe Previte 450fcd5ba7
refactor: pass all args to test-e2e script 2021-04-15 11:46:45 -07:00
Joe Previte d6f0725399
fix: update path for e2e videos 2021-04-15 11:46:45 -07:00
Joe Previte c9fa931a0b
fix: add retry 2 for failing e2e tests 2021-04-15 11:46:44 -07:00
Joe Previte 92b7c1e9a8
refactor: test-e2e.sh script 2021-04-15 11:46:44 -07:00
Joe Previte 6c3bb101cd
chore(deps): add resolution for newest playwright 2021-04-15 11:46:44 -07:00
Joe Previte 7ea6d22b3e
refactor: add login to config.js for e2e tests 2021-04-15 11:46:44 -07:00
Joe Previte 52586706c4
refactor: use playwright-test syntax for e2e tests 2021-04-15 11:46:43 -07:00
Joe Previte 08cd2d8191
refactor: add new e2e config 2021-04-15 11:46:43 -07:00
Joe Previte 0a090bf12b
chore(deps): add @playwright/test 2021-04-15 11:46:43 -07:00
Joe Previte ad0f12e664
refactor: check for editor consistently in tests 2021-04-06 15:46:58 -07:00
Joe Previte dd80eed5b0
feat: add logger to tests 2021-04-06 15:46:57 -07:00
Joe Previte fd69f2db88
refactor: logout test 2021-04-06 15:46:57 -07:00
Joe Previte c666b47668
refactor: globalSetup and create cookie manually 2021-04-06 15:46:56 -07:00
Joe Previte 51010e73cb
feat: add test for globalSetup 2021-04-06 15:46:56 -07:00
Joe Previte 4b703cbd4d
refactor: e2e tests based on jest-playwright 2021-04-06 15:46:56 -07:00
Joe Previte 1782f2a239
refactor: rename e2e test to loginPage 2021-04-06 15:46:56 -07:00
Joe Previte bd55cb94be
refactor: move test dir to jest e2e config 2021-04-06 15:46:56 -07:00
Joe Previte 6b3db06c7a
feat: add new e2e test to test browser 2021-04-06 15:46:56 -07:00
Joe Previte 3db19843e2
chore: add eslint plugin for jest-playwright 2021-04-06 15:46:55 -07:00
Joe Previte b4193b8c68
feat: add jest-playwright and packages 2021-04-06 15:46:55 -07:00
Joe Previte 9eff1f0702
fix: add timeout to logout test 2021-03-23 12:14:42 -07:00
Joe Previte 090687d057
feat: add e2e test for logout 2021-03-23 10:02:03 -07:00
Joe Previte 071c8e15fc
Merge branch 'main' into jsjoeio/upgrade-vscode-1.54 2021-03-17 13:51:27 -07:00
Joe Previte 36714da613
fixup: move openHelpAbout 2021-03-17 11:25:33 -07:00
Joe Previte d3df963d39
Merge branch 'main' into jsjoeio/upgrade-vscode-1.54 2021-03-16 14:42:51 -07:00
Joe Previte 481dd1f1d6
fixup: rename test 2021-03-16 14:36:31 -07:00
Joe Previte 608871eba1
wip: change name back to goHome 2021-03-16 14:26:04 -07:00
Joe Previte 3d9d2e592d
refactor: add helpAbout test instead of goHome 2021-03-16 14:25:28 -07:00
Joe Previte bcdca86539
refactor: change goHome test to helpAbout 2021-03-16 14:25:28 -07:00
Joe Previte 0c2708302d
refactor: remove --home flag/feature
We are removing this because it was removed upstream in PR~115599.
2021-03-16 14:25:28 -07:00
Asher 964ebe8d0a
Replace fs-extra with fs.promises
Remove the Mac directory copy instead of refactoring it since we've had
this for a long time now and I think it's safe to assume that users
running code-server on Mac don't have the old directory anymore.
2021-03-16 12:51:08 -05:00
Asher f33402c503
Remove extra awaits from tests 2021-03-15 15:34:44 -05:00
Joe Previte 7e23575978
chore: update code-server path in tsconfig 2021-03-12 12:00:57 -07:00
Joe Previte 9ee2556dd1
chore: update gitignore with test dirs 2021-03-12 12:00:57 -07:00
Joe Previte 6fd30d91ea
feat: add jest e2e config 2021-03-12 12:00:57 -07:00
Joe Previte d10da3f7c3
refactor: move test-plugin 2021-03-12 12:00:56 -07:00
Joe Previte cf6fdb90eb
refactor: create test/utils 2021-03-12 12:00:56 -07:00
Joe Previte b468597872
refactor: move e2e tests to test/e2e 2021-03-12 12:00:56 -07:00
Joe Previte 3f7104bb4e
refactor: move unit tests to test/unit 2021-03-12 12:00:56 -07:00
Joe Previte 925073db31
Merge pull request #2773 from cdr/upgrade-vscode-1.53
feat(vscode): update to version 1.53.2
2021-03-05 14:03:10 -07:00
Joe Previte e47eabf375
fix: goHome test after location change 2021-03-05 11:58:17 -07:00
Joe Previte 8c14799797
refactor: add custom mock for serviceWorker test 2021-02-26 16:05:35 -07:00
Joe Previte 6b56e6572d
feat(testing): add serviceWorker tests 2021-02-26 16:00:18 -07:00
Joe Previte 46226ea26b
chore(testing): add service-worker-mock 2021-02-26 11:58:29 -07:00
Joe Previte 80a180079e
feat: add test for catching errors in Emitter 2021-02-26 11:58:29 -07:00
Joe Previte b232dcbd4a
feat(register): add test when navigator undefined 2021-02-26 11:58:28 -07:00
Joe Previte e6a324b484
refactor: update mocking logger in register test 2021-02-26 11:58:28 -07:00
Joe Previte cb4185b360
refactor: use loggerModule in util 2021-02-26 11:58:28 -07:00
Joe Previte 1c737f1f93
refactor: hoist jest.mock in constants 2021-02-26 11:55:17 -07:00
Joe Previte 1470ff203a
refactor: dont use actual logger in helper 2021-02-26 11:55:17 -07:00
Joe Previte 711abd8d84
refactor: move loggerModule into helpers 2021-02-26 11:55:00 -07:00
Joe Previte 027e8e5adf
refactor: use LogModule from Asher in tests 2021-02-26 11:51:52 -07:00
Joe Previte a44a51462c
refactor: use same syntax as logger spy 2021-02-26 11:51:52 -07:00
Joe Previte 7ef630f7a4
refactor(register): use logError instead of logger 2021-02-26 11:51:52 -07:00
Joe Previte 38891de0d9
feat(test): add test handleRegisterServiceWorker 2021-02-26 11:51:52 -07:00
Joe Previte 44b9874fbe
feat: test failure to register service worker 2021-02-26 11:51:52 -07:00
Joe Previte 06aeca0a83
feat(testing): add register test 2021-02-26 11:51:51 -07:00
Joe Previte 28b440a4ba
feat: add cssStub to jest 2021-02-26 11:51:51 -07:00
Joe Previte 4f1f2c7171
fix: clean up comment in util.test.ts 2021-02-26 11:50:27 -07:00
Joe Previte 7dbb72a9c1
Merge pull request #2648 from cdr/e2e-test-go-home
feat(testing): add e2e test for 'Go Home' button
2021-02-25 11:21:43 -07:00
Joe Previte 325a1d8181
feat: add test for catching errors in Emitter 2021-02-22 13:44:43 -07:00
Joe Previte e0acb08d94
feat: add basic test for emitter 2021-02-22 13:44:43 -07:00
Asher 47a05c998a
Gate wtfnode behind WTF_NODE env var
After thinking about it some more it's probably mostly only useful to
see the output when the tests are hanging. Otherwise there's a lot of
noise about Jest child processes and pipes.
2021-02-22 13:41:12 -07:00
Asher 6685b3a4ff
Move wtfnode setup to global setup
I think Jest provides separate console methods for each test so when the
socket tests finish Jest complains that a test keeps trying to output.
2021-02-22 13:41:11 -07:00
Asher ef7e7271b6
Fix unreadable wtfnode output 2021-02-22 13:41:11 -07:00
Asher 6d4f814f84
Close context before browser
This seems to resolve a warning about a process being forcefully exited.
2021-02-22 13:41:11 -07:00
Joe Previte d61bbc4c4f
refactor(goHome): check url, remove timeout 2021-02-22 13:41:11 -07:00
Joe Previte b0fd55463b
refactor: add constants.ts with PASSWORD, etc 2021-02-22 13:41:11 -07:00
Joe Previte 5857b25079
chore: add todo regarding storage and cookies e2e 2021-02-22 13:41:10 -07:00
Joe Previte 3fa460c244
refactor: create helpers.ts & add Cookie 2021-02-22 13:41:10 -07:00
Joe Previte 38d7718feb
refactor: use promises for goHome test 2021-02-22 13:41:10 -07:00
Joe Previte 06af8b3202
refactor: update goHome location in test 2021-02-22 13:41:10 -07:00
Joe Previte d0eece3d8f
refactor: add note to test.sh about --home 2021-02-22 13:41:10 -07:00
Joe Previte 2dc56ad4d7
refactor: manually add cookie goHome 2021-02-22 13:41:10 -07:00
Joe Previte b02d2fb3cc
feat: add cookie utils for e2e tests 2021-02-22 13:41:10 -07:00
Joe Previte ffdbf3a730
feat: add test/videos & /screenshots to gitignore 2021-02-22 13:41:09 -07:00
Joe Previte 236717ee98
fix: update modulePathIgnorePatterns for jest 2021-02-22 13:41:09 -07:00
Joe Previte 34c6ec4c07
feat: add globalSetup for testing 2021-02-22 13:41:09 -07:00
Joe Previte 3033c8f9a2
feat: add test to visit go home in app menu 2021-02-22 13:41:08 -07:00
Joe Previte c2f1a2dace
feat: add test for login page 2021-02-22 13:41:08 -07:00
Asher 2d8b785fb8
Fix health socket not getting client messages
Forgot to resume. Went ahead and did the same for the test plugin
although it only sends messages and doesn't receive any.
2021-02-16 15:01:46 -06:00
Asher 7f80d152d3
Add healthz tests 2021-02-16 15:01:45 -06:00
Asher 59ba78c028
Force shutdown sockets during tests 2021-02-16 15:01:45 -06:00
Asher de11753569
Fill req.args for tests 2021-02-12 16:05:15 -06:00
Asher 8344e2062a
Merge pull request #2622 from cdr/plugin-additions 2021-02-10 16:45:00 -06:00
Asher de9491d5a6
Mark code-server as a virtual module 2021-02-10 13:13:23 -06:00
Asher 4f16087a94
Resolve code-server from the root
This fixes the lint script but unfortunately breaks my editor.
2021-02-09 16:36:26 -06:00
Asher e098df0766
Fix code-server module not being provided in Jest 2021-02-09 15:23:08 -06:00
Joe Previte c7c851dd01
feat: add tests for src/common/http 2021-02-09 13:13:19 -07:00
Asher 9647d65e52
Add code-server alias to eslint 2021-02-09 13:33:31 -06:00
Asher c78f56b334
Expose HttpError to plugins
This will let them throw and show nice errors more easily.
2021-02-09 13:09:38 -06:00
Asher 5505959f7e
Expose websocket server to plugins
Same reasoning used when exposing Express.
2021-02-09 13:09:34 -06:00
Asher 055e0ef9ec
Provide WsRouter to plugins 2021-02-09 13:09:27 -06:00
Asher fb37473e72
Load only test plugin during tests
The other plugins in my path were causing the tests to fail.
2021-02-09 12:20:30 -06:00
Asher a8e928798b
Re-export express for plugins 2021-02-09 12:19:38 -06:00
Asher 5f1fab7d27
Re-export logger field for plugins 2021-02-09 12:19:36 -06:00