diff --git a/docs/contributing/code-style.md b/docs/contributing/code-style.md index 7dd60b6186..e8de6fe3a9 100644 --- a/docs/contributing/code-style.md +++ b/docs/contributing/code-style.md @@ -198,8 +198,7 @@ number without any explicit conversion. ### JavaScript `const` and `let` Always declare JavaScript variables using `const` or `let` rather than -`var`, except in the Casper tests (since Casper does not support -`const` and `let`). +`var`. ### JavaScript and TypeScript `for (i in myArray)` diff --git a/docs/overview/directory-structure.md b/docs/overview/directory-structure.md index 8de1816ea6..37753cec9b 100644 --- a/docs/overview/directory-structure.md +++ b/docs/overview/directory-structure.md @@ -78,7 +78,7 @@ templating systems. * `frontend_tests/node_tests/` Node Frontend unit tests. -* `frontend_tests/casper_tests/` Casper frontend tests. +* `frontend_tests/puppeteer_tests/` Puppeteer frontend integration tests. * `tools/test-*` Developer-facing test runner scripts. diff --git a/docs/subsystems/caching.md b/docs/subsystems/caching.md index b5ed84c515..7299c2f2a8 100644 --- a/docs/subsystems/caching.md +++ b/docs/subsystems/caching.md @@ -211,7 +211,7 @@ time when debugging, since developers don't need to think about things like whether some test changed Hamlet's email address and that's why login is broken. -More full-stack test suites like `test-js-with-casper` or `test-api` +More full-stack test suites like `test-js-with-puppeteer` or `test-api` use a similar strategy (set a random `KEY_PREFIX` at the start of the test run). diff --git a/docs/subsystems/realms.md b/docs/subsystems/realms.md index cbdfd8927d..c96bb3f98e 100644 --- a/docs/subsystems/realms.md +++ b/docs/subsystems/realms.md @@ -84,5 +84,5 @@ lookup should still work even if you disable proxy for 127.0.0.1 testsubdomain.zulipdev.com ``` -These records are also useful if you want to e.g. run the casper tests +These records are also useful if you want to e.g. run the Puppeteer tests when you are not connected to the Internet. diff --git a/docs/subsystems/settings.md b/docs/subsystems/settings.md index b46db46ae9..ed8a15f626 100644 --- a/docs/subsystems/settings.md +++ b/docs/subsystems/settings.md @@ -96,7 +96,7 @@ additionally: `zproject/settings.py` and `zproject/test_extra_settings.py`. * `zproject/test_extra_settings.py` has the (default) settings used - for the Zulip tests (both backend and Casper), which are applied on + for the Zulip tests (both backend and Puppeteer), which are applied on top of the development environment settings. When adding a new server setting to Zulip, you will typically add it diff --git a/docs/tutorials/new-feature-tutorial.md b/docs/tutorials/new-feature-tutorial.md index 27eede9672..43b1b36e2b 100644 --- a/docs/tutorials/new-feature-tutorial.md +++ b/docs/tutorials/new-feature-tutorial.md @@ -56,7 +56,7 @@ organization in Zulip). The following files are involved in the process: zerver/lib/events.py implementation. **Frontend testing** -- `frontend_tests/casper_tests/10-admin.js`: end-to-end tests for the organization +- `frontend_tests/puppeteer_tests/08-admin.js`: end-to-end tests for the organization admin settings pages. - `frontend_tests/node_tests/dispatch.js` diff --git a/tools/check-templates b/tools/check-templates index 957da59058..dbcc7f9c65 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -38,13 +38,8 @@ def check_our_files(modified_only: bool, all_dups: bool, fix: bool, targets: Lis def check_html_templates(templates: Iterable[str], all_dups: bool, fix: bool) -> None: # Our files with .html extensions are usually for Django, but we also # have a few static .html files. - # - # We also have .html files that we vendored from Casper. - # The casperjs files use HTML5 (whereas Zulip prefers XHTML), and - # there are also cases where Casper deliberately uses invalid HTML, - # so we exclude them from our linter. logging.basicConfig(format='%(levelname)s:%(message)s') - templates = sorted(fn for fn in templates if 'casperjs' not in fn) + templates = sorted(fn for fn in templates) # Use of lodash templates <%= %>. if 'templates/zerver/team.html' in templates: templates.remove('templates/zerver/team.html') diff --git a/zerver/views/development/registration.py b/zerver/views/development/registration.py index 8f14bd03c6..849151234f 100644 --- a/zerver/views/development/registration.py +++ b/zerver/views/development/registration.py @@ -12,7 +12,7 @@ from zerver.views.auth import create_preregistration_user from zerver.views.registration import accounts_register -# This is used only by the casper test in 00-realm-creation.js. +# This is used only by the puppeteer test in 00-realm-creation.js. def confirmation_key(request: HttpRequest) -> HttpResponse: return json_success(request.session.get('confirmation_key')) diff --git a/zproject/dev_urls.py b/zproject/dev_urls.py index 03aae63101..9ceaef1622 100644 --- a/zproject/dev_urls.py +++ b/zproject/dev_urls.py @@ -28,10 +28,6 @@ urls = [ serve, {'document_root': os.path.join(settings.DEPLOY_ROOT, 'var/node-coverage/lcov-report'), 'show_indexes': True}), - path('casper/', - serve, {'document_root': - os.path.join(settings.DEPLOY_ROOT, 'var/casper'), - 'show_indexes': True}), path('docs/', serve, {'document_root': os.path.join(settings.DEPLOY_ROOT, 'docs/_build/html')}),