[openstreetmap/openstreetmap-website] Use rack by default for system tests (PR #6878)
Pablo Brasero
notifications at github.com
Mon Mar 16 16:36:03 UTC 2026
pablobm left a comment (openstreetmap/openstreetmap-website#6878)
My concerns are:
- The `sign_in_as` in the `setup` becomes unused, busy work for the JS tests. This can happen with any other browser interactions placed here and may cause confusion to contributors. I wonder if there can be some additional unintended effect, but I can't think of any right now.
- Can't select tests individually. Eg: `bin/rails test test/system/user_signup_test.rb:20` doesn't work.
I experimented with this too at https://github.com/openstreetmap/openstreetmap-website/compare/master...pablobm:rack-test-js-tests. My version of `js_test` uses metaprogramming to put the tests in a separate class. However this bring new issues ([quoting myself](https://github.com/openstreetmap/openstreetmap-website/pull/6497#issuecomment-3840561648)):
- If the new class inherits from the one where the tests are actually defined in code, then the tests will run twice: one for the new class and one for the parent.
- If the new class doesn't inherit from there, then the tests will not have access to `setup`/`teardown` or private helpers.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6878#issuecomment-4069018467
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6878/c4069018467 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260316/11062f03/attachment.htm>
More information about the rails-dev
mailing list