2013-02-05 14:16:51 -05:00
|
|
|
GEM
|
2013-03-07 12:20:19 -05:00
|
|
|
remote: https://rubygems.org/
|
2013-02-05 14:16:51 -05:00
|
|
|
specs:
|
2024-08-19 08:44:17 -04:00
|
|
|
actionmailer (7.2.2)
|
|
|
|
actionpack (= 7.2.2)
|
|
|
|
actionview (= 7.2.2)
|
|
|
|
activejob (= 7.2.2)
|
|
|
|
activesupport (= 7.2.2)
|
|
|
|
mail (>= 2.8.0)
|
2024-06-20 04:33:01 -04:00
|
|
|
rails-dom-testing (~> 2.2)
|
2024-08-19 08:44:17 -04:00
|
|
|
actionpack (7.2.2)
|
|
|
|
actionview (= 7.2.2)
|
|
|
|
activesupport (= 7.2.2)
|
2024-06-20 04:33:01 -04:00
|
|
|
nokogiri (>= 1.8.5)
|
|
|
|
racc
|
2024-08-19 08:44:17 -04:00
|
|
|
rack (>= 2.2.4, < 3.2)
|
2024-06-20 04:33:01 -04:00
|
|
|
rack-session (>= 1.0.1)
|
2017-10-03 02:56:44 -04:00
|
|
|
rack-test (>= 0.6.3)
|
2024-06-20 04:33:01 -04:00
|
|
|
rails-dom-testing (~> 2.2)
|
|
|
|
rails-html-sanitizer (~> 1.6)
|
2024-08-19 08:44:17 -04:00
|
|
|
useragent (~> 0.16)
|
|
|
|
actionview (7.2.2)
|
|
|
|
activesupport (= 7.2.2)
|
2014-05-08 00:14:24 -04:00
|
|
|
builder (~> 3.1)
|
2024-06-20 04:33:01 -04:00
|
|
|
erubi (~> 1.11)
|
|
|
|
rails-dom-testing (~> 2.2)
|
|
|
|
rails-html-sanitizer (~> 1.6)
|
2024-02-29 17:34:00 -05:00
|
|
|
actionview_precompiler (0.4.0)
|
2019-10-07 00:33:37 -04:00
|
|
|
actionview (>= 6.0.a)
|
2018-06-05 03:29:17 -04:00
|
|
|
active_model_serializers (0.8.4)
|
2013-07-23 14:42:52 -04:00
|
|
|
activemodel (>= 3.0)
|
2024-08-19 08:44:17 -04:00
|
|
|
activejob (7.2.2)
|
|
|
|
activesupport (= 7.2.2)
|
2017-08-22 22:58:25 -04:00
|
|
|
globalid (>= 0.3.6)
|
2024-08-19 08:44:17 -04:00
|
|
|
activemodel (7.2.2)
|
|
|
|
activesupport (= 7.2.2)
|
|
|
|
activerecord (7.2.2)
|
|
|
|
activemodel (= 7.2.2)
|
|
|
|
activesupport (= 7.2.2)
|
2024-06-20 04:33:01 -04:00
|
|
|
timeout (>= 0.4.0)
|
2024-08-19 08:44:17 -04:00
|
|
|
activesupport (7.2.2)
|
2024-06-20 04:33:01 -04:00
|
|
|
base64
|
2024-11-04 16:29:54 -05:00
|
|
|
benchmark (>= 0.3)
|
2024-06-20 04:33:01 -04:00
|
|
|
bigdecimal
|
2024-08-19 08:44:17 -04:00
|
|
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
2024-06-20 04:33:01 -04:00
|
|
|
connection_pool (>= 2.2.5)
|
|
|
|
drb
|
2021-04-21 05:36:32 -04:00
|
|
|
i18n (>= 1.6, < 2)
|
2024-11-04 16:29:54 -05:00
|
|
|
logger (>= 1.4.2)
|
2021-04-21 05:36:32 -04:00
|
|
|
minitest (>= 5.1)
|
2024-11-04 16:29:54 -05:00
|
|
|
securerandom (>= 0.3)
|
2024-08-19 08:44:17 -04:00
|
|
|
tzinfo (~> 2.0, >= 2.0.5)
|
2024-06-24 09:36:29 -04:00
|
|
|
addressable (2.8.7)
|
|
|
|
public_suffix (>= 2.0.2, < 7.0)
|
2022-02-10 20:01:38 -05:00
|
|
|
annotate (3.2.0)
|
|
|
|
activerecord (>= 3.2, < 8.0)
|
2019-12-06 01:11:10 -05:00
|
|
|
rake (>= 10.4, < 14.0)
|
2021-01-24 16:45:44 -05:00
|
|
|
ast (2.4.2)
|
2023-11-23 04:36:40 -05:00
|
|
|
aws-eventstream (1.3.0)
|
2024-02-29 06:23:21 -05:00
|
|
|
aws-partitions (1.894.0)
|
|
|
|
aws-sdk-core (3.191.3)
|
|
|
|
aws-eventstream (~> 1, >= 1.3.0)
|
|
|
|
aws-partitions (~> 1, >= 1.651.0)
|
|
|
|
aws-sigv4 (~> 1.8)
|
|
|
|
jmespath (~> 1, >= 1.6.1)
|
|
|
|
aws-sdk-kms (1.77.0)
|
|
|
|
aws-sdk-core (~> 3, >= 3.191.0)
|
2019-04-29 01:39:19 -04:00
|
|
|
aws-sigv4 (~> 1.1)
|
2024-02-29 06:23:21 -05:00
|
|
|
aws-sdk-s3 (1.143.0)
|
|
|
|
aws-sdk-core (~> 3, >= 3.191.0)
|
2017-10-03 03:00:42 -04:00
|
|
|
aws-sdk-kms (~> 1)
|
2024-02-29 06:23:21 -05:00
|
|
|
aws-sigv4 (~> 1.8)
|
|
|
|
aws-sdk-sns (1.72.0)
|
|
|
|
aws-sdk-core (~> 3, >= 3.191.0)
|
2019-12-11 13:18:11 -05:00
|
|
|
aws-sigv4 (~> 1.1)
|
2024-02-29 06:23:21 -05:00
|
|
|
aws-sigv4 (1.8.0)
|
2020-06-18 11:11:17 -04:00
|
|
|
aws-eventstream (~> 1, >= 1.0.2)
|
2023-11-07 16:54:43 -05:00
|
|
|
base64 (0.2.0)
|
2024-11-11 06:14:43 -05:00
|
|
|
benchmark (0.4.0)
|
2023-06-14 20:34:56 -04:00
|
|
|
better_errors (2.10.1)
|
2018-06-05 03:29:17 -04:00
|
|
|
erubi (>= 1.0.0)
|
2014-08-21 20:33:55 -04:00
|
|
|
rack (>= 0.9.0)
|
2023-04-30 20:09:43 -04:00
|
|
|
rouge (>= 1.0.0)
|
2024-05-08 02:07:50 -04:00
|
|
|
bigdecimal (3.1.8)
|
2024-03-07 16:44:25 -05:00
|
|
|
binding_of_caller (1.0.1)
|
|
|
|
debug_inspector (>= 1.2.0)
|
2024-08-05 19:32:23 -04:00
|
|
|
bootsnap (1.18.4)
|
2022-02-03 00:16:03 -05:00
|
|
|
msgpack (~> 1.2)
|
2024-06-07 09:19:20 -04:00
|
|
|
builder (3.3.0)
|
2024-11-11 06:14:58 -05:00
|
|
|
bullet (8.0.0)
|
2016-06-27 21:29:42 -04:00
|
|
|
activesupport (>= 3.0.0)
|
2019-02-04 01:54:39 -05:00
|
|
|
uniform_notifier (~> 1.11)
|
2020-04-23 18:13:35 -04:00
|
|
|
byebug (11.1.3)
|
2024-01-28 18:17:41 -05:00
|
|
|
capybara (3.40.0)
|
DEV: Minimal first pass of rails system test setup (#16311)
This commit introduces rails system tests run with chromedriver, selenium,
and headless chrome to our testing toolbox.
We use the `webdrivers` gem and `selenium-webdriver` which is what
the latest Rails uses so the tests run locally and in CI out of the box.
You can use `SELENIUM_VERBOSE_DRIVER_LOGS=1` to show extra
verbose logs of what selenium is doing to communicate with the system
tests.
By default JS logs are verbose so errors from JS are shown when
running system tests, you can disable this with
`SELENIUM_DISABLE_VERBOSE_JS_LOGS=1`
You can use `SELENIUM_HEADLESS=0` to run the system
tests inside a chrome browser instead of headless, which can be useful to debug things
and see what the spec sees. See note above about `bin/ember-cli` to avoid
surprises.
I have modified `bin/turbo_rspec` to exclude `spec/system` by default,
support for parallel system specs is a little shaky right now and we don't
want them slowing down the turbo by default either.
### PageObjects and System Tests
To make querying and inspecting parts of the page easier
and more reusable inbetween system tests, we are using the
concept of [PageObjects](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) in
our system tests. A "Page" here is generally corresponds to
an overarching ember route, e.g. "Topic" for `/t/324345/some-topic`,
and this contains logic for querying components within the topic
such as "Posts".
I have also split "Modals" into their own entity. Further down the
line we may want to explore creating independent "Component"
contexts.
Capybara DSL should be included in each PageObject class,
reference for this can be found at https://rubydoc.info/github/teamcapybara/capybara/master#the-dsl
For system tests, since they are so slow, we want to focus on
the "happy path" and not do every different possible context
and branch check using them. They are meant to be overarching
tests that check a number of things are correct using the full stack
from JS and ember to rails to ruby and then the database.
### CI Setup
Whenever a system spec fails, a screenshot
is taken and a build artifact is produced _after the entire CI run is complete_,
which can be downloaded from the Actions UI in the repo.
Most importantly, a step to build the Ember app using Ember CLI
is needed, otherwise the JS assets cannot be found by capybara:
```
- name: Build Ember CLI
run: bin/ember-cli --build
```
A new `--build` argument has been added to `bin/ember-cli` for this
case, which is not needed locally if you already have the discourse
rails server running via `bin/ember-cli -u` since the whole server is built and
set up by default.
Co-authored-by: David Taylor <david@taylorhq.com>
2022-09-27 21:48:16 -04:00
|
|
|
addressable
|
|
|
|
matrix
|
|
|
|
mini_mime (>= 0.1.3)
|
2024-01-28 18:17:41 -05:00
|
|
|
nokogiri (~> 1.11)
|
DEV: Minimal first pass of rails system test setup (#16311)
This commit introduces rails system tests run with chromedriver, selenium,
and headless chrome to our testing toolbox.
We use the `webdrivers` gem and `selenium-webdriver` which is what
the latest Rails uses so the tests run locally and in CI out of the box.
You can use `SELENIUM_VERBOSE_DRIVER_LOGS=1` to show extra
verbose logs of what selenium is doing to communicate with the system
tests.
By default JS logs are verbose so errors from JS are shown when
running system tests, you can disable this with
`SELENIUM_DISABLE_VERBOSE_JS_LOGS=1`
You can use `SELENIUM_HEADLESS=0` to run the system
tests inside a chrome browser instead of headless, which can be useful to debug things
and see what the spec sees. See note above about `bin/ember-cli` to avoid
surprises.
I have modified `bin/turbo_rspec` to exclude `spec/system` by default,
support for parallel system specs is a little shaky right now and we don't
want them slowing down the turbo by default either.
### PageObjects and System Tests
To make querying and inspecting parts of the page easier
and more reusable inbetween system tests, we are using the
concept of [PageObjects](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) in
our system tests. A "Page" here is generally corresponds to
an overarching ember route, e.g. "Topic" for `/t/324345/some-topic`,
and this contains logic for querying components within the topic
such as "Posts".
I have also split "Modals" into their own entity. Further down the
line we may want to explore creating independent "Component"
contexts.
Capybara DSL should be included in each PageObject class,
reference for this can be found at https://rubydoc.info/github/teamcapybara/capybara/master#the-dsl
For system tests, since they are so slow, we want to focus on
the "happy path" and not do every different possible context
and branch check using them. They are meant to be overarching
tests that check a number of things are correct using the full stack
from JS and ember to rails to ruby and then the database.
### CI Setup
Whenever a system spec fails, a screenshot
is taken and a build artifact is produced _after the entire CI run is complete_,
which can be downloaded from the Actions UI in the repo.
Most importantly, a step to build the Ember app using Ember CLI
is needed, otherwise the JS assets cannot be found by capybara:
```
- name: Build Ember CLI
run: bin/ember-cli --build
```
A new `--build` argument has been added to `bin/ember-cli` for this
case, which is not needed locally if you already have the discourse
rails server running via `bin/ember-cli -u` since the whole server is built and
set up by default.
Co-authored-by: David Taylor <david@taylorhq.com>
2022-09-27 21:48:16 -04:00
|
|
|
rack (>= 1.6.0)
|
|
|
|
rack-test (>= 0.6.3)
|
|
|
|
regexp_parser (>= 1.5, < 3.0)
|
|
|
|
xpath (~> 3.2)
|
2024-01-01 19:40:27 -05:00
|
|
|
cbor (0.5.9.8)
|
2014-09-24 20:40:35 -04:00
|
|
|
certified (1.0.0)
|
2023-12-05 16:58:57 -05:00
|
|
|
cgi (0.4.1)
|
2020-12-28 16:27:31 -05:00
|
|
|
chunky_png (1.4.0)
|
2020-06-01 10:21:46 -04:00
|
|
|
coderay (1.1.3)
|
2023-08-24 18:37:46 -04:00
|
|
|
colored2 (4.0.0)
|
2024-08-11 21:21:54 -04:00
|
|
|
concurrent-ruby (1.3.4)
|
2023-05-21 20:42:02 -04:00
|
|
|
connection_pool (2.4.1)
|
2024-08-13 04:49:55 -04:00
|
|
|
cose (1.3.1)
|
2019-10-01 22:08:41 -04:00
|
|
|
cbor (~> 0.5.9)
|
2020-07-09 14:13:32 -04:00
|
|
|
openssl-signature_algorithm (~> 1.0)
|
2022-01-31 17:45:10 -05:00
|
|
|
cppjieba_rb (0.4.2)
|
2024-02-11 17:56:19 -05:00
|
|
|
crack (1.0.0)
|
2024-01-29 17:42:59 -05:00
|
|
|
bigdecimal
|
2020-12-28 21:57:30 -05:00
|
|
|
rexml
|
2020-01-13 09:27:16 -05:00
|
|
|
crass (1.0.6)
|
2024-10-14 03:50:49 -04:00
|
|
|
css_parser (1.19.1)
|
2019-07-30 15:05:08 -04:00
|
|
|
addressable
|
2024-05-13 01:23:15 -04:00
|
|
|
csv (3.3.0)
|
2024-11-03 17:17:57 -05:00
|
|
|
date (3.4.0)
|
2023-12-12 17:14:59 -05:00
|
|
|
debug_inspector (1.2.0)
|
2024-01-31 17:44:19 -05:00
|
|
|
diff-lcs (1.5.1)
|
2024-10-21 17:51:05 -04:00
|
|
|
diffy (3.4.3)
|
2022-12-05 17:01:13 -05:00
|
|
|
digest (3.1.1)
|
2021-08-11 18:03:15 -04:00
|
|
|
discourse-fonts (0.0.9)
|
2022-10-06 18:16:04 -04:00
|
|
|
discourse-seed-fu (2.3.12)
|
|
|
|
activerecord (>= 3.1)
|
|
|
|
activesupport (>= 3.1)
|
2022-05-04 11:18:10 -04:00
|
|
|
discourse_dev_assets (0.0.4)
|
2021-03-04 12:34:51 -05:00
|
|
|
faker (~> 2.16)
|
2021-07-14 10:51:34 -04:00
|
|
|
literate_randomizer
|
2024-07-26 08:44:11 -04:00
|
|
|
docile (1.4.1)
|
2024-05-14 17:44:50 -04:00
|
|
|
drb (2.2.1)
|
2024-09-12 09:09:10 -04:00
|
|
|
dry-initializer (3.1.1)
|
2020-06-05 10:00:59 -04:00
|
|
|
email_reply_trimmer (0.1.13)
|
2024-06-17 08:55:38 -04:00
|
|
|
erubi (1.13.0)
|
2024-11-14 17:50:30 -05:00
|
|
|
excon (1.2.1)
|
2024-10-23 18:24:55 -04:00
|
|
|
execjs (2.10.0)
|
2023-05-28 21:20:08 -04:00
|
|
|
exifr (1.4.0)
|
2024-09-09 11:14:39 -04:00
|
|
|
extralite-bundle (2.8.2)
|
2023-11-27 17:05:16 -05:00
|
|
|
fabrication (2.31.0)
|
2022-09-21 21:52:34 -04:00
|
|
|
faker (2.23.0)
|
2022-03-06 18:48:27 -05:00
|
|
|
i18n (>= 1.8.11, < 2)
|
2013-02-13 05:32:18 -05:00
|
|
|
fakeweb (1.3.0)
|
2024-11-14 16:55:07 -05:00
|
|
|
faraday (2.12.1)
|
|
|
|
faraday-net_http (>= 2.0, < 3.5)
|
2024-09-18 19:19:03 -04:00
|
|
|
json
|
2024-07-10 08:50:14 -04:00
|
|
|
logger
|
2024-11-14 16:55:07 -05:00
|
|
|
faraday-net_http (3.4.0)
|
|
|
|
net-http (>= 0.5.0)
|
2024-04-15 18:17:34 -04:00
|
|
|
faraday-retry (2.2.1)
|
2022-10-05 08:19:04 -04:00
|
|
|
faraday (~> 2.0)
|
2021-08-17 22:44:07 -04:00
|
|
|
fast_blank (1.0.1)
|
2024-04-01 20:23:06 -04:00
|
|
|
fastimage (2.3.1)
|
2024-06-05 17:25:10 -04:00
|
|
|
ffi (1.17.0-aarch64-linux-gnu)
|
|
|
|
ffi (1.17.0-arm64-darwin)
|
|
|
|
ffi (1.17.0-x86_64-darwin)
|
|
|
|
ffi (1.17.0-x86_64-linux-gnu)
|
2019-12-16 15:19:31 -05:00
|
|
|
fspath (3.1.2)
|
2023-09-05 19:41:29 -04:00
|
|
|
globalid (1.2.1)
|
2023-09-03 21:40:57 -04:00
|
|
|
activesupport (>= 6.1)
|
2024-10-23 18:25:35 -04:00
|
|
|
google-protobuf (4.28.3-aarch64-linux)
|
2024-05-27 05:42:03 -04:00
|
|
|
bigdecimal
|
2024-03-14 18:35:22 -04:00
|
|
|
rake (>= 13)
|
2024-10-23 18:25:35 -04:00
|
|
|
google-protobuf (4.28.3-arm64-darwin)
|
2024-05-27 05:42:03 -04:00
|
|
|
bigdecimal
|
2024-03-14 18:35:22 -04:00
|
|
|
rake (>= 13)
|
2024-10-23 18:25:35 -04:00
|
|
|
google-protobuf (4.28.3-x86_64-darwin)
|
2024-05-27 05:42:03 -04:00
|
|
|
bigdecimal
|
2024-03-14 18:35:22 -04:00
|
|
|
rake (>= 13)
|
2024-10-23 18:25:35 -04:00
|
|
|
google-protobuf (4.28.3-x86_64-linux)
|
2024-05-27 05:42:03 -04:00
|
|
|
bigdecimal
|
2024-03-14 18:35:22 -04:00
|
|
|
rake (>= 13)
|
2015-03-09 20:09:49 -04:00
|
|
|
guess_html_encoding (0.0.11)
|
2021-01-21 18:28:08 -05:00
|
|
|
hana (1.3.7)
|
2024-11-12 19:02:08 -05:00
|
|
|
hashdiff (1.1.2)
|
2022-01-11 13:43:57 -05:00
|
|
|
hashie (5.0.0)
|
2024-08-28 21:27:36 -04:00
|
|
|
highline (3.1.1)
|
2024-07-17 06:56:11 -04:00
|
|
|
reline
|
2015-09-23 03:10:15 -04:00
|
|
|
htmlentities (4.3.4)
|
2019-12-05 21:00:16 -05:00
|
|
|
http_accept_language (2.1.1)
|
2024-09-16 19:23:04 -04:00
|
|
|
i18n (1.14.6)
|
2018-06-05 03:29:17 -04:00
|
|
|
concurrent-ruby (~> 1.0)
|
2024-11-19 16:35:28 -05:00
|
|
|
image_optim (0.31.4)
|
2021-05-24 21:27:20 -04:00
|
|
|
exifr (~> 1.2, >= 1.2.2)
|
|
|
|
fspath (~> 3.0)
|
2021-10-21 22:21:33 -04:00
|
|
|
image_size (>= 1.5, < 4)
|
2021-05-24 21:27:20 -04:00
|
|
|
in_threads (~> 1.3)
|
|
|
|
progress (~> 3.0, >= 3.0.1)
|
2024-01-16 17:42:31 -05:00
|
|
|
image_size (3.4.0)
|
2022-02-07 08:11:52 -05:00
|
|
|
in_threads (1.6.0)
|
2024-06-20 04:33:01 -04:00
|
|
|
io-console (0.7.2)
|
2024-09-29 20:06:11 -04:00
|
|
|
irb (1.14.1)
|
2024-06-20 04:33:01 -04:00
|
|
|
rdoc (>= 4.0.0)
|
|
|
|
reline (>= 0.4.2)
|
2024-04-05 07:17:30 -04:00
|
|
|
iso8601 (0.13.0)
|
2022-11-27 16:37:17 -05:00
|
|
|
jmespath (1.6.2)
|
2024-11-14 17:50:06 -05:00
|
|
|
json (2.8.2)
|
2024-11-20 16:44:07 -05:00
|
|
|
json-schema (5.1.0)
|
2024-10-06 22:08:23 -04:00
|
|
|
addressable (~> 2.8)
|
2024-05-31 09:05:13 -04:00
|
|
|
json_schemer (2.3.0)
|
2024-03-03 20:05:22 -05:00
|
|
|
bigdecimal
|
2021-01-21 18:28:08 -05:00
|
|
|
hana (~> 1.3)
|
|
|
|
regexp_parser (~> 2.0)
|
2023-06-08 10:48:39 -04:00
|
|
|
simpleidn (~> 0.2)
|
2024-10-03 19:04:31 -04:00
|
|
|
jwt (2.9.3)
|
2024-02-18 21:25:23 -05:00
|
|
|
base64
|
2021-05-26 18:31:36 -04:00
|
|
|
kgio (2.11.4)
|
2023-06-21 10:00:19 -04:00
|
|
|
language_server-protocol (3.17.0.3)
|
2024-09-30 00:34:04 -04:00
|
|
|
libv8-node (18.19.0.0-aarch64-linux)
|
|
|
|
libv8-node (18.19.0.0-arm64-darwin)
|
|
|
|
libv8-node (18.19.0.0-x86_64-darwin)
|
|
|
|
libv8-node (18.19.0.0-x86_64-linux)
|
2024-02-25 23:35:40 -05:00
|
|
|
listen (3.9.0)
|
2019-12-10 11:48:40 -05:00
|
|
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
|
|
rb-inotify (~> 0.9, >= 0.9.10)
|
2021-07-14 10:51:34 -04:00
|
|
|
literate_randomizer (0.4.0)
|
2024-09-02 22:33:06 -04:00
|
|
|
logger (1.6.1)
|
2023-10-10 18:19:07 -04:00
|
|
|
lograge (0.14.0)
|
2018-06-05 03:29:17 -04:00
|
|
|
actionpack (>= 4)
|
|
|
|
activesupport (>= 4)
|
|
|
|
railties (>= 4)
|
2017-10-27 05:54:45 -04:00
|
|
|
request_store (~> 1.0)
|
2017-10-31 20:37:11 -04:00
|
|
|
logstash-event (1.2.02)
|
2024-07-08 02:03:11 -04:00
|
|
|
logster (2.20.0)
|
2024-10-27 19:08:51 -04:00
|
|
|
loofah (2.23.1)
|
2017-10-03 02:56:44 -04:00
|
|
|
crass (~> 1.0.2)
|
2023-05-12 05:28:23 -04:00
|
|
|
nokogiri (>= 1.12.0)
|
2015-06-04 11:03:11 -04:00
|
|
|
lru_redux (1.1.0)
|
2019-09-04 03:18:32 -04:00
|
|
|
lz4-ruby (0.3.3)
|
2023-03-24 15:10:28 -04:00
|
|
|
mail (2.8.1)
|
|
|
|
mini_mime (>= 0.1.1)
|
|
|
|
net-imap
|
|
|
|
net-pop
|
|
|
|
net-smtp
|
DEV: Minimal first pass of rails system test setup (#16311)
This commit introduces rails system tests run with chromedriver, selenium,
and headless chrome to our testing toolbox.
We use the `webdrivers` gem and `selenium-webdriver` which is what
the latest Rails uses so the tests run locally and in CI out of the box.
You can use `SELENIUM_VERBOSE_DRIVER_LOGS=1` to show extra
verbose logs of what selenium is doing to communicate with the system
tests.
By default JS logs are verbose so errors from JS are shown when
running system tests, you can disable this with
`SELENIUM_DISABLE_VERBOSE_JS_LOGS=1`
You can use `SELENIUM_HEADLESS=0` to run the system
tests inside a chrome browser instead of headless, which can be useful to debug things
and see what the spec sees. See note above about `bin/ember-cli` to avoid
surprises.
I have modified `bin/turbo_rspec` to exclude `spec/system` by default,
support for parallel system specs is a little shaky right now and we don't
want them slowing down the turbo by default either.
### PageObjects and System Tests
To make querying and inspecting parts of the page easier
and more reusable inbetween system tests, we are using the
concept of [PageObjects](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) in
our system tests. A "Page" here is generally corresponds to
an overarching ember route, e.g. "Topic" for `/t/324345/some-topic`,
and this contains logic for querying components within the topic
such as "Posts".
I have also split "Modals" into their own entity. Further down the
line we may want to explore creating independent "Component"
contexts.
Capybara DSL should be included in each PageObject class,
reference for this can be found at https://rubydoc.info/github/teamcapybara/capybara/master#the-dsl
For system tests, since they are so slow, we want to focus on
the "happy path" and not do every different possible context
and branch check using them. They are meant to be overarching
tests that check a number of things are correct using the full stack
from JS and ember to rails to ruby and then the database.
### CI Setup
Whenever a system spec fails, a screenshot
is taken and a build artifact is produced _after the entire CI run is complete_,
which can be downloaded from the Actions UI in the repo.
Most importantly, a step to build the Ember app using Ember CLI
is needed, otherwise the JS assets cannot be found by capybara:
```
- name: Build Ember CLI
run: bin/ember-cli --build
```
A new `--build` argument has been added to `bin/ember-cli` for this
case, which is not needed locally if you already have the discourse
rails server running via `bin/ember-cli -u` since the whole server is built and
set up by default.
Co-authored-by: David Taylor <david@taylorhq.com>
2022-09-27 21:48:16 -04:00
|
|
|
matrix (0.4.2)
|
2019-02-04 19:23:21 -05:00
|
|
|
maxminddb (0.1.22)
|
2024-09-17 19:38:56 -04:00
|
|
|
memory_profiler (1.1.0)
|
2023-08-14 22:20:41 -04:00
|
|
|
message_bus (4.3.8)
|
2013-12-06 01:06:52 -05:00
|
|
|
rack (>= 1.1.3)
|
2024-07-24 12:05:17 -04:00
|
|
|
messageformat-wrapper (1.1.0)
|
2024-06-17 12:21:04 -04:00
|
|
|
mini_racer (>= 0.6.3)
|
2024-04-15 18:17:10 -04:00
|
|
|
method_source (1.1.0)
|
2023-08-08 20:02:00 -04:00
|
|
|
mini_mime (1.1.5)
|
2024-09-30 00:34:04 -04:00
|
|
|
mini_racer (0.14.1)
|
|
|
|
libv8-node (~> 18.19.0.0)
|
2024-08-08 00:20:16 -04:00
|
|
|
mini_scheduler (0.17.0)
|
2022-11-17 10:50:47 -05:00
|
|
|
sidekiq (>= 4.2.3, < 7.0)
|
2024-08-22 18:56:12 -04:00
|
|
|
mini_sql (1.6.0)
|
2021-12-01 11:53:20 -05:00
|
|
|
mini_suffix (0.3.3)
|
2017-11-29 03:24:27 -05:00
|
|
|
ffi (~> 1.9)
|
2023-10-25 04:38:59 -04:00
|
|
|
minio_runner (0.1.2)
|
2024-11-21 17:50:17 -05:00
|
|
|
minitest (5.25.2)
|
2024-11-24 18:35:36 -05:00
|
|
|
mocha (2.6.0)
|
2022-11-03 18:05:30 -04:00
|
|
|
ruby2_keywords (>= 0.0.5)
|
2024-11-12 19:02:01 -05:00
|
|
|
msgpack (1.7.5)
|
2020-07-13 15:33:49 -04:00
|
|
|
multi_json (1.15.0)
|
2024-05-01 21:28:36 -04:00
|
|
|
multi_xml (0.7.1)
|
2024-05-01 06:30:13 -04:00
|
|
|
bigdecimal (~> 3.1)
|
2019-12-08 22:21:55 -05:00
|
|
|
mustache (1.1.1)
|
2024-11-07 18:14:56 -05:00
|
|
|
net-http (0.5.0)
|
2022-03-21 10:28:52 -04:00
|
|
|
uri
|
2024-11-11 06:09:26 -05:00
|
|
|
net-imap (0.5.1)
|
2023-01-22 17:37:00 -05:00
|
|
|
date
|
2022-03-21 10:28:52 -04:00
|
|
|
net-protocol
|
2022-09-28 22:23:09 -04:00
|
|
|
net-pop (0.1.2)
|
2022-03-21 10:28:52 -04:00
|
|
|
net-protocol
|
2023-11-07 16:53:32 -05:00
|
|
|
net-protocol (0.2.2)
|
2022-03-21 10:28:52 -04:00
|
|
|
timeout
|
2024-03-27 05:53:04 -04:00
|
|
|
net-smtp (0.5.0)
|
2022-03-21 10:28:52 -04:00
|
|
|
net-protocol
|
2024-10-28 18:22:32 -04:00
|
|
|
nio4r (2.7.4)
|
2024-07-28 20:55:24 -04:00
|
|
|
nokogiri (1.16.7-aarch64-linux)
|
2021-01-27 10:20:29 -05:00
|
|
|
racc (~> 1.4)
|
2024-07-28 20:55:24 -04:00
|
|
|
nokogiri (1.16.7-arm64-darwin)
|
2021-01-05 11:12:05 -05:00
|
|
|
racc (~> 1.4)
|
2024-07-28 20:55:24 -04:00
|
|
|
nokogiri (1.16.7-x86_64-darwin)
|
2022-02-03 07:55:48 -05:00
|
|
|
racc (~> 1.4)
|
2024-07-28 20:55:24 -04:00
|
|
|
nokogiri (1.16.7-x86_64-linux)
|
2021-01-05 11:12:05 -05:00
|
|
|
racc (~> 1.4)
|
2022-09-11 17:25:39 -04:00
|
|
|
oauth (1.1.0)
|
|
|
|
oauth-tty (~> 1.0, >= 1.0.1)
|
|
|
|
snaky_hash (~> 2.0)
|
|
|
|
version_gem (~> 1.1)
|
2022-10-25 03:29:48 -04:00
|
|
|
oauth-tty (1.0.5)
|
|
|
|
version_gem (~> 1.1, >= 1.1.1)
|
2022-09-27 06:42:33 -04:00
|
|
|
oauth2 (1.4.11)
|
|
|
|
faraday (>= 0.17.3, < 3.0)
|
2018-12-31 14:07:18 -05:00
|
|
|
jwt (>= 1.0, < 3.0)
|
2014-02-23 18:11:16 -05:00
|
|
|
multi_json (~> 1.3)
|
|
|
|
multi_xml (~> 0.5)
|
2022-09-27 06:42:33 -04:00
|
|
|
rack (>= 1.2, < 4)
|
2024-11-03 16:50:51 -05:00
|
|
|
oj (3.16.7)
|
2023-12-12 17:11:52 -05:00
|
|
|
bigdecimal (>= 3.0)
|
2024-08-12 06:16:54 -04:00
|
|
|
ostruct (>= 0.2)
|
2022-08-21 18:09:46 -04:00
|
|
|
omniauth (1.9.2)
|
2020-03-16 09:12:10 -04:00
|
|
|
hashie (>= 3.4.6)
|
2017-03-27 16:51:52 -04:00
|
|
|
rack (>= 1.6.2, < 3)
|
2021-10-26 06:09:20 -04:00
|
|
|
omniauth-facebook (9.0.0)
|
2014-09-24 20:40:35 -04:00
|
|
|
omniauth-oauth2 (~> 1.2)
|
2020-02-11 04:36:41 -05:00
|
|
|
omniauth-github (1.4.0)
|
2017-08-07 04:43:54 -04:00
|
|
|
omniauth (~> 1.5)
|
|
|
|
omniauth-oauth2 (>= 1.4.0, < 2.0)
|
2021-03-15 17:34:14 -04:00
|
|
|
omniauth-google-oauth2 (0.8.2)
|
2018-12-31 14:07:18 -05:00
|
|
|
jwt (>= 2.0)
|
2020-12-14 05:35:50 -05:00
|
|
|
oauth2 (~> 1.1)
|
2021-03-15 17:34:14 -04:00
|
|
|
omniauth (~> 1.1)
|
2019-12-09 15:13:07 -05:00
|
|
|
omniauth-oauth2 (>= 1.6)
|
2024-08-27 18:26:44 -04:00
|
|
|
omniauth-oauth (1.2.1)
|
2013-02-12 08:47:22 -05:00
|
|
|
oauth
|
2021-01-29 06:34:18 -05:00
|
|
|
omniauth (>= 1.0, < 3)
|
2024-08-27 18:26:44 -04:00
|
|
|
rack (>= 1.6.2, < 4)
|
2022-09-27 07:01:36 -04:00
|
|
|
omniauth-oauth2 (1.7.3)
|
|
|
|
oauth2 (>= 1.4, < 3)
|
2021-01-11 16:53:07 -05:00
|
|
|
omniauth (>= 1.9, < 3)
|
2018-06-05 03:29:17 -04:00
|
|
|
omniauth-twitter (1.4.0)
|
2015-09-23 03:18:43 -04:00
|
|
|
omniauth-oauth (~> 1.1)
|
2017-01-14 20:10:09 -05:00
|
|
|
rack
|
2023-09-25 04:16:13 -04:00
|
|
|
openssl (3.2.0)
|
2023-02-16 05:11:41 -05:00
|
|
|
openssl-signature_algorithm (1.3.0)
|
|
|
|
openssl (> 2.0)
|
2024-11-12 19:02:29 -05:00
|
|
|
optimist (3.2.0)
|
2024-11-11 06:10:14 -05:00
|
|
|
ostruct (0.6.1)
|
2024-08-18 18:55:14 -04:00
|
|
|
parallel (1.26.3)
|
2024-09-11 08:25:37 -04:00
|
|
|
parallel_tests (4.7.2)
|
2019-04-01 04:27:49 -04:00
|
|
|
parallel
|
2024-11-05 16:48:04 -05:00
|
|
|
parser (3.3.6.0)
|
2020-06-22 12:39:59 -04:00
|
|
|
ast (~> 2.4.1)
|
2023-06-11 20:02:44 -04:00
|
|
|
racc
|
2023-10-23 05:57:28 -04:00
|
|
|
pg (1.5.4)
|
2023-03-10 05:11:48 -05:00
|
|
|
prettier_print (1.2.1)
|
2021-04-04 18:45:09 -04:00
|
|
|
progress (3.6.0)
|
2023-01-10 17:18:26 -05:00
|
|
|
pry (0.14.2)
|
2020-04-29 19:40:50 -04:00
|
|
|
coderay (~> 1.1)
|
|
|
|
method_source (~> 1.0)
|
2022-08-16 21:36:27 -04:00
|
|
|
pry-byebug (3.10.1)
|
2020-06-04 22:30:34 -04:00
|
|
|
byebug (~> 11.0)
|
2022-08-15 22:39:25 -04:00
|
|
|
pry (>= 0.13, < 0.15)
|
2024-06-22 20:52:22 -04:00
|
|
|
pry-rails (0.3.11)
|
|
|
|
pry (>= 0.13.0)
|
2024-04-28 20:34:28 -04:00
|
|
|
pry-stack_explorer (0.6.1)
|
|
|
|
binding_of_caller (~> 1.0)
|
|
|
|
pry (~> 0.13)
|
2024-11-07 18:12:43 -05:00
|
|
|
psych (5.2.0)
|
2024-06-20 04:33:01 -04:00
|
|
|
stringio
|
2024-07-23 09:28:24 -04:00
|
|
|
public_suffix (6.0.1)
|
2024-11-24 18:36:10 -05:00
|
|
|
puma (6.5.0)
|
2019-12-08 20:51:41 -05:00
|
|
|
nio4r (~> 2.0)
|
2024-07-30 20:54:09 -04:00
|
|
|
racc (1.8.1)
|
2024-10-14 17:59:37 -04:00
|
|
|
rack (2.2.10)
|
2024-02-15 05:29:17 -05:00
|
|
|
rack-mini-profiler (3.3.1)
|
2016-03-06 06:22:45 -05:00
|
|
|
rack (>= 1.2.0)
|
2024-01-01 19:40:40 -05:00
|
|
|
rack-protection (3.2.0)
|
|
|
|
base64 (>= 0.1.0)
|
2023-08-07 19:26:45 -04:00
|
|
|
rack (~> 2.2, >= 2.2.4)
|
2024-06-20 04:33:01 -04:00
|
|
|
rack-session (1.0.2)
|
|
|
|
rack (< 3)
|
2023-03-15 09:26:43 -04:00
|
|
|
rack-test (2.1.0)
|
2022-06-27 16:13:46 -04:00
|
|
|
rack (>= 1.3)
|
2024-08-19 08:44:17 -04:00
|
|
|
rackup (1.0.1)
|
2024-06-20 04:33:01 -04:00
|
|
|
rack (< 3)
|
|
|
|
webrick
|
2023-08-03 19:03:58 -04:00
|
|
|
rails-dom-testing (2.2.0)
|
2023-07-02 19:09:34 -04:00
|
|
|
activesupport (>= 5.0.0)
|
|
|
|
minitest
|
2017-08-22 22:58:25 -04:00
|
|
|
nokogiri (>= 1.6)
|
2023-05-25 06:23:18 -04:00
|
|
|
rails-html-sanitizer (1.6.0)
|
|
|
|
loofah (~> 2.21)
|
|
|
|
nokogiri (~> 1.14)
|
2024-07-04 02:33:34 -04:00
|
|
|
rails_failover (2.1.1)
|
2024-05-30 18:49:20 -04:00
|
|
|
activerecord (>= 6.1, < 8.0)
|
2020-11-25 06:21:50 -05:00
|
|
|
concurrent-ruby
|
2024-05-30 18:49:20 -04:00
|
|
|
railties (>= 6.1, < 8.0)
|
2024-08-14 07:05:32 -04:00
|
|
|
rails_multisite (6.1.0)
|
2023-05-25 06:23:18 -04:00
|
|
|
activerecord (>= 6.0)
|
|
|
|
railties (>= 6.0)
|
2024-08-19 08:44:17 -04:00
|
|
|
railties (7.2.2)
|
|
|
|
actionpack (= 7.2.2)
|
|
|
|
activesupport (= 7.2.2)
|
|
|
|
irb (~> 1.13)
|
2024-06-20 04:33:01 -04:00
|
|
|
rackup (>= 1.0.0)
|
2022-03-21 10:28:52 -04:00
|
|
|
rake (>= 12.2)
|
2024-06-20 04:33:01 -04:00
|
|
|
thor (~> 1.0, >= 1.2.2)
|
|
|
|
zeitwerk (~> 2.6)
|
2022-01-11 13:54:27 -05:00
|
|
|
rainbow (3.1.1)
|
2023-02-27 05:09:21 -05:00
|
|
|
raindrops (0.20.1)
|
2024-04-07 19:03:05 -04:00
|
|
|
rake (13.2.1)
|
2022-08-29 21:49:28 -04:00
|
|
|
rb-fsevent (0.11.2)
|
2024-05-19 19:02:52 -04:00
|
|
|
rb-inotify (0.11.1)
|
2019-03-20 12:04:26 -04:00
|
|
|
ffi (~> 1.0)
|
2023-12-19 14:59:21 -05:00
|
|
|
rbtrace (0.5.1)
|
2013-12-06 01:06:52 -05:00
|
|
|
ffi (>= 1.0.6)
|
|
|
|
msgpack (>= 0.4.3)
|
2019-02-04 19:23:21 -05:00
|
|
|
optimist (>= 3.0.0)
|
2018-07-31 06:02:18 -04:00
|
|
|
rchardet (1.8.0)
|
2024-11-19 16:48:20 -05:00
|
|
|
rdoc (6.8.1)
|
2024-06-20 04:33:01 -04:00
|
|
|
psych (>= 4.0.0)
|
2023-12-10 16:01:36 -05:00
|
|
|
redcarpet (3.6.0)
|
2023-02-12 19:14:19 -05:00
|
|
|
redis (4.8.1)
|
2023-06-11 21:07:36 -04:00
|
|
|
redis-namespace (1.11.0)
|
2022-08-14 21:35:57 -04:00
|
|
|
redis (>= 4)
|
2024-05-15 22:12:48 -04:00
|
|
|
regexp_parser (2.9.2)
|
2024-11-11 06:11:48 -05:00
|
|
|
reline (0.5.11)
|
2024-06-20 04:33:01 -04:00
|
|
|
io-console (~> 0.5)
|
2024-05-02 19:16:31 -04:00
|
|
|
request_store (1.7.0)
|
2018-06-05 03:29:17 -04:00
|
|
|
rack (>= 1.4)
|
2024-10-24 17:48:06 -04:00
|
|
|
rexml (3.3.9)
|
2019-04-29 01:00:58 -04:00
|
|
|
rinku (2.0.6)
|
2023-08-31 05:55:04 -04:00
|
|
|
rotp (6.3.0)
|
2024-11-12 19:01:53 -05:00
|
|
|
rouge (4.5.1)
|
2023-05-17 20:05:28 -04:00
|
|
|
rqrcode (2.2.0)
|
2017-12-21 20:18:12 -05:00
|
|
|
chunky_png (~> 1.0)
|
2021-05-06 10:13:52 -04:00
|
|
|
rqrcode_core (~> 1.0)
|
2021-08-27 08:21:06 -04:00
|
|
|
rqrcode_core (1.2.0)
|
2024-04-05 07:17:30 -04:00
|
|
|
rrule (0.6.0)
|
|
|
|
activesupport (>= 2.3)
|
2024-02-05 01:15:42 -05:00
|
|
|
rspec (3.13.0)
|
|
|
|
rspec-core (~> 3.13.0)
|
|
|
|
rspec-expectations (~> 3.13.0)
|
|
|
|
rspec-mocks (~> 3.13.0)
|
2024-10-21 07:37:03 -04:00
|
|
|
rspec-core (3.13.2)
|
2024-02-05 01:15:42 -05:00
|
|
|
rspec-support (~> 3.13.0)
|
2024-09-08 19:04:13 -04:00
|
|
|
rspec-expectations (3.13.3)
|
2015-04-25 18:29:43 -04:00
|
|
|
diff-lcs (>= 1.2.0, < 2.0)
|
2024-02-05 01:15:42 -05:00
|
|
|
rspec-support (~> 3.13.0)
|
2022-07-26 18:47:17 -04:00
|
|
|
rspec-html-matchers (0.10.0)
|
2015-09-24 18:20:59 -04:00
|
|
|
nokogiri (~> 1)
|
2022-07-26 18:47:17 -04:00
|
|
|
rspec (>= 3.0.0.a)
|
2024-10-02 18:25:19 -04:00
|
|
|
rspec-mocks (3.13.2)
|
2015-04-25 18:29:43 -04:00
|
|
|
diff-lcs (>= 1.2.0, < 2.0)
|
2024-02-05 01:15:42 -05:00
|
|
|
rspec-support (~> 3.13.0)
|
2024-07-31 04:12:54 -04:00
|
|
|
rspec-multi-mock (0.3.1)
|
|
|
|
rspec (>= 3.7.0)
|
2024-11-11 12:04:08 -05:00
|
|
|
rspec-rails (7.1.0)
|
2024-09-02 22:33:21 -04:00
|
|
|
actionpack (>= 7.0)
|
|
|
|
activesupport (>= 7.0)
|
|
|
|
railties (>= 7.0)
|
2024-03-18 18:18:20 -04:00
|
|
|
rspec-core (~> 3.13)
|
|
|
|
rspec-expectations (~> 3.13)
|
|
|
|
rspec-mocks (~> 3.13)
|
|
|
|
rspec-support (~> 3.13)
|
2024-02-25 23:35:54 -05:00
|
|
|
rspec-support (3.13.1)
|
2024-08-05 07:08:12 -04:00
|
|
|
rss (0.3.1)
|
2021-09-19 23:51:47 -04:00
|
|
|
rexml
|
2024-11-14 05:19:06 -05:00
|
|
|
rswag-specs (2.16.0)
|
|
|
|
activesupport (>= 5.2, < 8.1)
|
2024-10-06 22:08:23 -04:00
|
|
|
json-schema (>= 2.2, < 6.0)
|
2024-11-14 05:19:06 -05:00
|
|
|
railties (>= 5.2, < 8.1)
|
2022-10-19 04:47:09 -04:00
|
|
|
rspec-core (>= 2.14)
|
2023-05-31 19:09:48 -04:00
|
|
|
rtlcss (0.2.1)
|
|
|
|
mini_racer (>= 0.6.3)
|
2024-11-26 19:51:01 -05:00
|
|
|
rubocop (1.69.0)
|
2022-06-30 00:45:32 -04:00
|
|
|
json (~> 2.3)
|
2023-06-21 10:00:19 -04:00
|
|
|
language_server-protocol (>= 3.17.0)
|
2017-07-31 21:51:44 -04:00
|
|
|
parallel (~> 1.10)
|
2024-01-15 17:00:00 -05:00
|
|
|
parser (>= 3.3.0.2)
|
2018-03-13 02:58:23 -04:00
|
|
|
rainbow (>= 2.2.2, < 4.0)
|
2024-07-10 07:00:50 -04:00
|
|
|
regexp_parser (>= 2.4, < 3.0)
|
2024-11-26 19:51:01 -05:00
|
|
|
rubocop-ast (>= 1.36.1, < 2.0)
|
2017-07-31 21:51:44 -04:00
|
|
|
ruby-progressbar (~> 1.7)
|
2024-11-26 19:51:01 -05:00
|
|
|
unicode-display_width (>= 2.4.0, < 4.0)
|
2024-11-13 16:49:24 -05:00
|
|
|
rubocop-ast (1.36.1)
|
2024-04-29 19:37:27 -04:00
|
|
|
parser (>= 3.3.1.0)
|
2024-06-09 21:00:26 -04:00
|
|
|
rubocop-capybara (2.21.0)
|
2023-01-16 17:40:33 -05:00
|
|
|
rubocop (~> 1.41)
|
2024-11-14 17:43:36 -05:00
|
|
|
rubocop-discourse (3.8.6)
|
2024-02-01 11:28:10 -05:00
|
|
|
activesupport (>= 6.1)
|
2023-12-18 07:44:36 -05:00
|
|
|
rubocop (>= 1.59.0)
|
2024-02-01 11:28:10 -05:00
|
|
|
rubocop-capybara (>= 2.0.0)
|
|
|
|
rubocop-factory_bot (>= 2.0.0)
|
2024-05-27 06:27:13 -04:00
|
|
|
rubocop-rails (>= 2.25.0)
|
2024-06-12 09:37:25 -04:00
|
|
|
rubocop-rspec (>= 3.0.1)
|
|
|
|
rubocop-rspec_rails (>= 2.30.0)
|
2024-06-11 18:54:00 -04:00
|
|
|
rubocop-factory_bot (2.26.1)
|
|
|
|
rubocop (~> 1.61)
|
2024-10-27 18:23:33 -04:00
|
|
|
rubocop-rails (2.27.0)
|
2024-05-27 06:27:13 -04:00
|
|
|
activesupport (>= 4.2.0)
|
|
|
|
rack (>= 1.1)
|
2024-08-25 20:47:31 -04:00
|
|
|
rubocop (>= 1.52.0, < 2.0)
|
2024-05-27 06:27:13 -04:00
|
|
|
rubocop-ast (>= 1.31.1, < 2.0)
|
2024-10-27 18:20:04 -04:00
|
|
|
rubocop-rspec (3.2.0)
|
2024-06-11 19:07:29 -04:00
|
|
|
rubocop (~> 1.61)
|
2024-06-12 09:37:25 -04:00
|
|
|
rubocop-rspec_rails (2.30.0)
|
|
|
|
rubocop (~> 1.61)
|
|
|
|
rubocop-rspec (~> 3, >= 3.0.1)
|
2024-10-21 08:07:47 -04:00
|
|
|
ruby-prof (1.7.1)
|
2023-03-05 22:52:37 -05:00
|
|
|
ruby-progressbar (1.13.0)
|
2024-09-06 07:36:23 -04:00
|
|
|
ruby-readability (0.7.2)
|
2014-02-17 11:44:28 -05:00
|
|
|
guess_html_encoding (>= 0.0.4)
|
2014-09-24 20:40:35 -04:00
|
|
|
nokogiri (>= 1.6.0)
|
2021-07-18 19:21:31 -04:00
|
|
|
ruby2_keywords (0.0.5)
|
2021-07-05 18:25:33 -04:00
|
|
|
rubyzip (2.3.2)
|
2024-08-15 08:59:44 -04:00
|
|
|
sanitize (6.1.3)
|
2015-09-23 03:10:15 -04:00
|
|
|
crass (~> 1.0.2)
|
2021-08-04 20:49:07 -04:00
|
|
|
nokogiri (>= 1.12.0)
|
2024-07-12 07:07:13 -04:00
|
|
|
sass-embedded (1.77.5-aarch64-linux-gnu)
|
|
|
|
google-protobuf (>= 3.25, < 5.0)
|
|
|
|
sass-embedded (1.77.5-arm64-darwin)
|
|
|
|
google-protobuf (>= 3.25, < 5.0)
|
|
|
|
sass-embedded (1.77.5-x86_64-darwin)
|
|
|
|
google-protobuf (>= 3.25, < 5.0)
|
|
|
|
sass-embedded (1.77.5-x86_64-linux-gnu)
|
|
|
|
google-protobuf (>= 3.25, < 5.0)
|
2024-07-07 20:39:45 -04:00
|
|
|
sassc-embedded (1.77.7)
|
2024-07-01 07:28:00 -04:00
|
|
|
sass-embedded (~> 1.77)
|
2024-11-11 18:28:11 -05:00
|
|
|
securerandom (0.3.2)
|
2024-11-25 16:46:36 -05:00
|
|
|
selenium-devtools (0.131.0)
|
2023-12-08 15:05:52 -05:00
|
|
|
selenium-webdriver (~> 4.2)
|
2024-11-25 16:46:44 -05:00
|
|
|
selenium-webdriver (4.27.0)
|
2024-01-23 16:52:21 -05:00
|
|
|
base64 (~> 0.2)
|
2024-06-23 05:55:33 -04:00
|
|
|
logger (~> 1.4)
|
DEV: Minimal first pass of rails system test setup (#16311)
This commit introduces rails system tests run with chromedriver, selenium,
and headless chrome to our testing toolbox.
We use the `webdrivers` gem and `selenium-webdriver` which is what
the latest Rails uses so the tests run locally and in CI out of the box.
You can use `SELENIUM_VERBOSE_DRIVER_LOGS=1` to show extra
verbose logs of what selenium is doing to communicate with the system
tests.
By default JS logs are verbose so errors from JS are shown when
running system tests, you can disable this with
`SELENIUM_DISABLE_VERBOSE_JS_LOGS=1`
You can use `SELENIUM_HEADLESS=0` to run the system
tests inside a chrome browser instead of headless, which can be useful to debug things
and see what the spec sees. See note above about `bin/ember-cli` to avoid
surprises.
I have modified `bin/turbo_rspec` to exclude `spec/system` by default,
support for parallel system specs is a little shaky right now and we don't
want them slowing down the turbo by default either.
### PageObjects and System Tests
To make querying and inspecting parts of the page easier
and more reusable inbetween system tests, we are using the
concept of [PageObjects](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) in
our system tests. A "Page" here is generally corresponds to
an overarching ember route, e.g. "Topic" for `/t/324345/some-topic`,
and this contains logic for querying components within the topic
such as "Posts".
I have also split "Modals" into their own entity. Further down the
line we may want to explore creating independent "Component"
contexts.
Capybara DSL should be included in each PageObject class,
reference for this can be found at https://rubydoc.info/github/teamcapybara/capybara/master#the-dsl
For system tests, since they are so slow, we want to focus on
the "happy path" and not do every different possible context
and branch check using them. They are meant to be overarching
tests that check a number of things are correct using the full stack
from JS and ember to rails to ruby and then the database.
### CI Setup
Whenever a system spec fails, a screenshot
is taken and a build artifact is produced _after the entire CI run is complete_,
which can be downloaded from the Actions UI in the repo.
Most importantly, a step to build the Ember app using Ember CLI
is needed, otherwise the JS assets cannot be found by capybara:
```
- name: Build Ember CLI
run: bin/ember-cli --build
```
A new `--build` argument has been added to `bin/ember-cli` for this
case, which is not needed locally if you already have the discourse
rails server running via `bin/ember-cli -u` since the whole server is built and
set up by default.
Co-authored-by: David Taylor <david@taylorhq.com>
2022-09-27 21:48:16 -04:00
|
|
|
rexml (~> 3.2, >= 3.2.5)
|
|
|
|
rubyzip (>= 1.2.2, < 3.0)
|
|
|
|
websocket (~> 1.0)
|
2024-08-18 18:56:34 -04:00
|
|
|
shoulda-matchers (6.4.0)
|
2024-01-22 06:12:51 -05:00
|
|
|
activesupport (>= 5.2.0)
|
2023-10-10 18:19:15 -04:00
|
|
|
sidekiq (6.5.12)
|
2022-11-17 12:42:24 -05:00
|
|
|
connection_pool (>= 2.2.5, < 3)
|
2020-02-13 22:53:31 -05:00
|
|
|
rack (~> 2.0)
|
2022-08-30 03:34:53 -04:00
|
|
|
redis (>= 4.5.0, < 5)
|
2023-01-04 13:47:12 -05:00
|
|
|
simplecov (0.22.0)
|
2019-04-01 01:00:11 -04:00
|
|
|
docile (~> 1.1)
|
2020-02-12 13:51:21 -05:00
|
|
|
simplecov-html (~> 0.11)
|
2020-11-29 16:02:46 -05:00
|
|
|
simplecov_json_formatter (~> 0.1)
|
2024-09-11 08:24:43 -04:00
|
|
|
simplecov-html (0.13.1)
|
2022-02-14 19:33:24 -05:00
|
|
|
simplecov_json_formatter (0.1.4)
|
2024-05-22 18:59:30 -04:00
|
|
|
simpleidn (0.2.3)
|
2022-10-25 03:30:06 -04:00
|
|
|
snaky_hash (2.0.1)
|
2022-09-11 17:25:39 -04:00
|
|
|
hashie
|
2022-10-25 03:30:06 -04:00
|
|
|
version_gem (~> 1.1, >= 1.1.1)
|
2024-09-20 08:35:56 -04:00
|
|
|
sprockets (3.7.5)
|
2024-04-03 22:58:19 -04:00
|
|
|
base64
|
|
|
|
concurrent-ruby (~> 1.0)
|
|
|
|
rack (> 1, < 3)
|
2024-08-01 07:04:51 -04:00
|
|
|
sprockets-rails (3.5.2)
|
2024-06-07 09:22:56 -04:00
|
|
|
actionpack (>= 6.1)
|
|
|
|
activesupport (>= 6.1)
|
2016-04-17 22:47:52 -04:00
|
|
|
sprockets (>= 3.0.0)
|
2024-11-25 16:46:20 -05:00
|
|
|
sqlite3 (2.3.1-aarch64-linux-gnu)
|
|
|
|
sqlite3 (2.3.1-arm64-darwin)
|
|
|
|
sqlite3 (2.3.1-x86_64-darwin)
|
|
|
|
sqlite3 (2.3.1-x86_64-linux-gnu)
|
2023-08-25 04:54:43 -04:00
|
|
|
sshkey (3.0.0)
|
2024-01-15 17:01:27 -05:00
|
|
|
stackprof (0.2.26)
|
2024-11-07 18:10:28 -05:00
|
|
|
stringio (3.1.2)
|
2023-11-29 00:38:07 -05:00
|
|
|
syntax_tree (6.2.0)
|
2023-01-07 06:11:08 -05:00
|
|
|
prettier_print (>= 1.2.0)
|
|
|
|
syntax_tree-disable_ternary (1.0.0)
|
2024-09-10 04:44:18 -04:00
|
|
|
test-prof (1.4.2)
|
2024-08-29 19:36:32 -04:00
|
|
|
thor (1.3.2)
|
2024-11-06 18:13:09 -05:00
|
|
|
timeout (0.4.2)
|
2024-10-14 02:40:20 -04:00
|
|
|
trilogy (2.9.0)
|
2023-01-29 16:44:59 -05:00
|
|
|
tzinfo (2.0.6)
|
2021-04-21 05:36:32 -04:00
|
|
|
concurrent-ruby (~> 1.0)
|
2024-09-06 05:26:45 -04:00
|
|
|
tzinfo-data (1.2024.2)
|
2023-02-21 11:52:04 -05:00
|
|
|
tzinfo (>= 1.0.0)
|
2024-09-30 04:08:10 -04:00
|
|
|
uglifier (4.2.1)
|
2016-05-22 22:23:15 -04:00
|
|
|
execjs (>= 0.3.0, < 3)
|
2024-08-19 09:40:49 -04:00
|
|
|
unf (0.2.0)
|
2024-11-26 19:51:01 -05:00
|
|
|
unicode-display_width (3.1.2)
|
|
|
|
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
|
|
unicode-emoji (4.0.4)
|
2022-01-03 06:17:54 -05:00
|
|
|
unicorn (6.1.0)
|
2013-07-07 00:30:52 -04:00
|
|
|
kgio (~> 2.6)
|
|
|
|
raindrops (~> 0.7)
|
2022-03-24 18:26:49 -04:00
|
|
|
uniform_notifier (1.16.0)
|
2024-11-14 16:54:50 -05:00
|
|
|
uri (1.0.2)
|
2024-08-19 08:44:17 -04:00
|
|
|
useragent (0.16.10)
|
2024-03-21 19:29:37 -04:00
|
|
|
version_gem (1.1.4)
|
2023-11-14 07:07:29 -05:00
|
|
|
web-push (3.0.1)
|
2023-01-12 10:12:19 -05:00
|
|
|
jwt (~> 2.0)
|
|
|
|
openssl (~> 3.0)
|
2024-09-30 23:33:11 -04:00
|
|
|
webmock (3.24.0)
|
2021-08-05 18:04:10 -04:00
|
|
|
addressable (>= 2.8.0)
|
2017-04-15 00:11:02 -04:00
|
|
|
crack (>= 0.3.2)
|
2019-12-10 13:38:03 -05:00
|
|
|
hashdiff (>= 0.4.0, < 2.0.0)
|
2024-11-03 16:32:07 -05:00
|
|
|
webrick (1.9.0)
|
2024-07-08 20:49:15 -04:00
|
|
|
websocket (1.2.11)
|
DEV: Minimal first pass of rails system test setup (#16311)
This commit introduces rails system tests run with chromedriver, selenium,
and headless chrome to our testing toolbox.
We use the `webdrivers` gem and `selenium-webdriver` which is what
the latest Rails uses so the tests run locally and in CI out of the box.
You can use `SELENIUM_VERBOSE_DRIVER_LOGS=1` to show extra
verbose logs of what selenium is doing to communicate with the system
tests.
By default JS logs are verbose so errors from JS are shown when
running system tests, you can disable this with
`SELENIUM_DISABLE_VERBOSE_JS_LOGS=1`
You can use `SELENIUM_HEADLESS=0` to run the system
tests inside a chrome browser instead of headless, which can be useful to debug things
and see what the spec sees. See note above about `bin/ember-cli` to avoid
surprises.
I have modified `bin/turbo_rspec` to exclude `spec/system` by default,
support for parallel system specs is a little shaky right now and we don't
want them slowing down the turbo by default either.
### PageObjects and System Tests
To make querying and inspecting parts of the page easier
and more reusable inbetween system tests, we are using the
concept of [PageObjects](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) in
our system tests. A "Page" here is generally corresponds to
an overarching ember route, e.g. "Topic" for `/t/324345/some-topic`,
and this contains logic for querying components within the topic
such as "Posts".
I have also split "Modals" into their own entity. Further down the
line we may want to explore creating independent "Component"
contexts.
Capybara DSL should be included in each PageObject class,
reference for this can be found at https://rubydoc.info/github/teamcapybara/capybara/master#the-dsl
For system tests, since they are so slow, we want to focus on
the "happy path" and not do every different possible context
and branch check using them. They are meant to be overarching
tests that check a number of things are correct using the full stack
from JS and ember to rails to ruby and then the database.
### CI Setup
Whenever a system spec fails, a screenshot
is taken and a build artifact is produced _after the entire CI run is complete_,
which can be downloaded from the Actions UI in the repo.
Most importantly, a step to build the Ember app using Ember CLI
is needed, otherwise the JS assets cannot be found by capybara:
```
- name: Build Ember CLI
run: bin/ember-cli --build
```
A new `--build` argument has been added to `bin/ember-cli` for this
case, which is not needed locally if you already have the discourse
rails server running via `bin/ember-cli -u` since the whole server is built and
set up by default.
Co-authored-by: David Taylor <david@taylorhq.com>
2022-09-27 21:48:16 -04:00
|
|
|
xpath (3.2.0)
|
|
|
|
nokogiri (~> 1.8)
|
2023-01-16 13:12:12 -05:00
|
|
|
yaml-lint (0.1.2)
|
2024-09-04 18:34:55 -04:00
|
|
|
yard (0.9.37)
|
2024-10-21 07:37:32 -04:00
|
|
|
zeitwerk (2.7.1)
|
2013-02-05 14:16:51 -05:00
|
|
|
|
|
|
|
PLATFORMS
|
2021-11-30 14:31:11 -05:00
|
|
|
aarch64-linux
|
2021-01-27 10:20:29 -05:00
|
|
|
arm64-darwin-20
|
2023-12-13 16:15:42 -05:00
|
|
|
arm64-darwin-21
|
2023-12-08 10:34:03 -05:00
|
|
|
arm64-darwin-22
|
2024-01-30 18:20:19 -05:00
|
|
|
arm64-darwin-23
|
2024-06-14 16:25:02 -04:00
|
|
|
arm64-darwin-24
|
2020-12-28 23:39:50 -05:00
|
|
|
x86_64-darwin-18
|
|
|
|
x86_64-darwin-19
|
|
|
|
x86_64-darwin-20
|
2024-01-08 15:41:00 -05:00
|
|
|
x86_64-darwin-22
|
2024-10-28 07:06:41 -04:00
|
|
|
x86_64-darwin-23
|
|
|
|
x86_64-darwin-24
|
2020-12-28 23:12:30 -05:00
|
|
|
x86_64-linux
|
2013-02-05 14:16:51 -05:00
|
|
|
|
|
|
|
DEPENDENCIES
|
2024-08-19 08:44:17 -04:00
|
|
|
actionmailer (~> 7.2.0)
|
|
|
|
actionpack (~> 7.2.0)
|
|
|
|
actionview (~> 7.2.0)
|
2019-10-07 00:33:37 -04:00
|
|
|
actionview_precompiler
|
2015-04-23 16:20:53 -04:00
|
|
|
active_model_serializers (~> 0.8.3)
|
2024-08-19 08:44:17 -04:00
|
|
|
activemodel (~> 7.2.0)
|
|
|
|
activerecord (~> 7.2.0)
|
|
|
|
activesupport (~> 7.2.0)
|
2019-12-16 19:33:51 -05:00
|
|
|
addressable
|
2013-12-06 01:06:52 -05:00
|
|
|
annotate
|
2017-10-03 03:00:42 -04:00
|
|
|
aws-sdk-s3
|
2019-02-13 15:26:40 -05:00
|
|
|
aws-sdk-sns
|
2013-02-05 14:16:51 -05:00
|
|
|
better_errors
|
|
|
|
binding_of_caller
|
2017-05-26 13:26:45 -04:00
|
|
|
bootsnap
|
2016-06-27 21:29:42 -04:00
|
|
|
bullet
|
2015-08-13 23:59:06 -04:00
|
|
|
byebug
|
DEV: Minimal first pass of rails system test setup (#16311)
This commit introduces rails system tests run with chromedriver, selenium,
and headless chrome to our testing toolbox.
We use the `webdrivers` gem and `selenium-webdriver` which is what
the latest Rails uses so the tests run locally and in CI out of the box.
You can use `SELENIUM_VERBOSE_DRIVER_LOGS=1` to show extra
verbose logs of what selenium is doing to communicate with the system
tests.
By default JS logs are verbose so errors from JS are shown when
running system tests, you can disable this with
`SELENIUM_DISABLE_VERBOSE_JS_LOGS=1`
You can use `SELENIUM_HEADLESS=0` to run the system
tests inside a chrome browser instead of headless, which can be useful to debug things
and see what the spec sees. See note above about `bin/ember-cli` to avoid
surprises.
I have modified `bin/turbo_rspec` to exclude `spec/system` by default,
support for parallel system specs is a little shaky right now and we don't
want them slowing down the turbo by default either.
### PageObjects and System Tests
To make querying and inspecting parts of the page easier
and more reusable inbetween system tests, we are using the
concept of [PageObjects](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) in
our system tests. A "Page" here is generally corresponds to
an overarching ember route, e.g. "Topic" for `/t/324345/some-topic`,
and this contains logic for querying components within the topic
such as "Posts".
I have also split "Modals" into their own entity. Further down the
line we may want to explore creating independent "Component"
contexts.
Capybara DSL should be included in each PageObject class,
reference for this can be found at https://rubydoc.info/github/teamcapybara/capybara/master#the-dsl
For system tests, since they are so slow, we want to focus on
the "happy path" and not do every different possible context
and branch check using them. They are meant to be overarching
tests that check a number of things are correct using the full stack
from JS and ember to rails to ruby and then the database.
### CI Setup
Whenever a system spec fails, a screenshot
is taken and a build artifact is produced _after the entire CI run is complete_,
which can be downloaded from the Actions UI in the repo.
Most importantly, a step to build the Ember app using Ember CLI
is needed, otherwise the JS assets cannot be found by capybara:
```
- name: Build Ember CLI
run: bin/ember-cli --build
```
A new `--build` argument has been added to `bin/ember-cli` for this
case, which is not needed locally if you already have the discourse
rails server running via `bin/ember-cli -u` since the whole server is built and
set up by default.
Co-authored-by: David Taylor <david@taylorhq.com>
2022-09-27 21:48:16 -04:00
|
|
|
capybara
|
2019-10-01 22:08:41 -04:00
|
|
|
cbor
|
2013-02-05 14:16:51 -05:00
|
|
|
certified
|
2022-12-22 17:52:20 -05:00
|
|
|
cgi (>= 0.3.6)
|
2018-09-04 17:57:20 -04:00
|
|
|
colored2
|
2019-10-01 22:08:41 -04:00
|
|
|
cose
|
2017-07-31 15:28:48 -04:00
|
|
|
cppjieba_rb
|
2019-07-30 15:05:08 -04:00
|
|
|
css_parser
|
2024-05-13 01:23:15 -04:00
|
|
|
csv
|
2019-06-07 04:21:37 -04:00
|
|
|
diffy
|
2022-10-12 09:22:22 -04:00
|
|
|
digest
|
2020-08-31 06:14:09 -04:00
|
|
|
discourse-fonts
|
2022-10-06 18:16:04 -04:00
|
|
|
discourse-seed-fu
|
2021-06-14 11:04:44 -04:00
|
|
|
discourse_dev_assets
|
2024-09-12 09:09:10 -04:00
|
|
|
dry-initializer (~> 3.1)
|
2019-12-05 21:00:16 -05:00
|
|
|
email_reply_trimmer
|
2015-05-25 03:57:06 -04:00
|
|
|
excon
|
2016-05-20 03:06:44 -04:00
|
|
|
execjs
|
2024-09-09 11:14:39 -04:00
|
|
|
extralite-bundle
|
2018-05-28 03:09:02 -04:00
|
|
|
fabrication
|
2021-06-14 11:04:44 -04:00
|
|
|
faker (~> 2.16)
|
2019-12-05 21:00:16 -05:00
|
|
|
fakeweb
|
2022-10-05 08:19:04 -04:00
|
|
|
faraday
|
|
|
|
faraday-retry
|
2013-04-07 19:42:39 -04:00
|
|
|
fast_blank
|
2018-01-04 03:53:53 -05:00
|
|
|
fastimage
|
2020-08-19 11:15:23 -04:00
|
|
|
highline
|
2014-06-05 20:34:21 -04:00
|
|
|
htmlentities
|
2019-12-05 21:00:16 -05:00
|
|
|
http_accept_language
|
2021-05-24 21:27:20 -04:00
|
|
|
image_optim
|
2024-04-05 07:17:30 -04:00
|
|
|
iso8601
|
2020-03-24 00:21:50 -04:00
|
|
|
json
|
2021-01-21 18:28:08 -05:00
|
|
|
json_schemer
|
2017-04-13 10:26:07 -04:00
|
|
|
listen
|
2017-10-27 05:54:45 -04:00
|
|
|
lograge
|
2017-10-31 20:37:11 -04:00
|
|
|
logstash-event
|
2022-05-09 18:19:02 -04:00
|
|
|
logster
|
2021-04-07 11:51:19 -04:00
|
|
|
loofah
|
2013-04-23 21:59:59 -04:00
|
|
|
lru_redux
|
2019-09-04 03:18:32 -04:00
|
|
|
lz4-ruby
|
2023-03-24 15:10:28 -04:00
|
|
|
mail
|
2018-10-09 10:21:41 -04:00
|
|
|
maxminddb
|
2014-05-07 23:49:34 -04:00
|
|
|
memory_profiler
|
2023-06-29 20:14:16 -04:00
|
|
|
message_bus
|
2024-06-17 12:21:04 -04:00
|
|
|
messageformat-wrapper
|
2017-06-13 07:27:05 -04:00
|
|
|
mini_mime
|
2024-09-30 00:34:04 -04:00
|
|
|
mini_racer
|
2018-07-31 17:12:55 -04:00
|
|
|
mini_scheduler
|
2018-06-19 02:13:14 -04:00
|
|
|
mini_sql
|
2017-11-29 03:24:27 -05:00
|
|
|
mini_suffix
|
2023-08-22 21:18:33 -04:00
|
|
|
minio_runner
|
2020-04-21 12:32:42 -04:00
|
|
|
mocha
|
2013-02-05 14:16:51 -05:00
|
|
|
multi_json
|
|
|
|
mustache
|
2022-03-21 10:28:52 -04:00
|
|
|
net-http
|
2022-10-12 09:22:22 -04:00
|
|
|
net-imap
|
|
|
|
net-pop
|
|
|
|
net-smtp
|
2016-06-07 02:54:36 -04:00
|
|
|
nokogiri
|
2023-06-29 19:39:55 -04:00
|
|
|
oj
|
2013-02-12 01:51:44 -05:00
|
|
|
omniauth
|
2013-02-12 08:47:22 -05:00
|
|
|
omniauth-facebook
|
2017-08-07 04:43:54 -04:00
|
|
|
omniauth-github
|
2019-06-03 14:17:00 -04:00
|
|
|
omniauth-google-oauth2
|
2013-08-18 00:43:59 -04:00
|
|
|
omniauth-oauth2
|
2013-02-12 08:47:22 -05:00
|
|
|
omniauth-twitter
|
2024-10-21 07:36:40 -04:00
|
|
|
parallel
|
2019-04-01 04:27:49 -04:00
|
|
|
parallel_tests
|
2018-06-19 02:13:14 -04:00
|
|
|
pg
|
2020-06-04 22:30:34 -04:00
|
|
|
pry-byebug
|
2013-02-05 14:16:51 -05:00
|
|
|
pry-rails
|
2024-04-28 20:34:28 -04:00
|
|
|
pry-stack_explorer
|
2013-08-29 01:26:27 -04:00
|
|
|
puma
|
2020-07-08 02:42:31 -04:00
|
|
|
rack
|
2014-02-17 11:44:28 -05:00
|
|
|
rack-mini-profiler
|
2013-10-28 20:00:31 -04:00
|
|
|
rack-protection
|
2023-06-19 21:49:22 -04:00
|
|
|
rails-dom-testing
|
2020-06-11 01:45:46 -04:00
|
|
|
rails_failover
|
2018-02-12 01:08:02 -05:00
|
|
|
rails_multisite
|
2024-08-19 08:44:17 -04:00
|
|
|
railties (~> 7.2.0)
|
2013-02-05 14:16:51 -05:00
|
|
|
rake
|
|
|
|
rb-fsevent
|
2023-12-19 14:59:21 -05:00
|
|
|
rbtrace
|
2018-07-31 06:02:18 -04:00
|
|
|
rchardet
|
2023-12-10 16:01:36 -05:00
|
|
|
redcarpet
|
2024-04-19 03:22:12 -04:00
|
|
|
redis (< 5.0)
|
2015-12-31 23:40:12 -05:00
|
|
|
redis-namespace
|
2013-02-05 14:16:51 -05:00
|
|
|
rinku
|
2020-08-19 11:16:33 -04:00
|
|
|
rotp
|
2017-12-21 20:18:12 -05:00
|
|
|
rqrcode
|
2024-04-05 07:17:30 -04:00
|
|
|
rrule
|
2016-05-29 23:38:04 -04:00
|
|
|
rspec
|
2015-09-24 18:20:59 -04:00
|
|
|
rspec-html-matchers
|
2024-07-31 04:12:54 -04:00
|
|
|
rspec-multi-mock
|
2020-05-04 01:20:30 -04:00
|
|
|
rspec-rails
|
2021-09-19 23:51:47 -04:00
|
|
|
rss
|
2023-12-06 19:16:47 -05:00
|
|
|
rswag-specs
|
2023-02-16 10:15:56 -05:00
|
|
|
rtlcss
|
2022-09-27 07:07:09 -04:00
|
|
|
rubocop-discourse
|
2017-09-05 02:55:20 -04:00
|
|
|
ruby-prof
|
2024-09-09 11:14:39 -04:00
|
|
|
ruby-progressbar
|
2014-04-15 00:45:00 -04:00
|
|
|
ruby-readability
|
2019-07-18 08:34:48 -04:00
|
|
|
rubyzip
|
2021-05-26 05:41:35 -04:00
|
|
|
sanitize
|
2023-12-08 10:34:03 -05:00
|
|
|
sassc-embedded
|
2023-12-08 15:05:52 -05:00
|
|
|
selenium-devtools
|
2023-10-30 15:52:08 -04:00
|
|
|
selenium-webdriver (~> 4.14)
|
2024-01-22 06:12:51 -05:00
|
|
|
shoulda-matchers
|
2014-02-23 18:00:25 -05:00
|
|
|
sidekiq
|
2019-04-01 01:00:11 -04:00
|
|
|
simplecov
|
2024-04-03 22:58:19 -04:00
|
|
|
sprockets (~> 3.7.3)
|
2017-08-22 22:58:25 -04:00
|
|
|
sprockets-rails
|
2023-12-10 16:01:36 -05:00
|
|
|
sqlite3
|
2018-03-09 00:14:21 -05:00
|
|
|
sshkey
|
2014-02-17 21:24:42 -05:00
|
|
|
stackprof
|
2023-01-07 06:11:08 -05:00
|
|
|
syntax_tree
|
|
|
|
syntax_tree-disable_ternary
|
2019-04-19 04:52:31 -04:00
|
|
|
test-prof
|
2017-03-02 13:35:47 -05:00
|
|
|
thor
|
2024-09-09 11:14:39 -04:00
|
|
|
trilogy
|
2023-02-21 11:52:04 -05:00
|
|
|
tzinfo-data
|
2013-02-05 14:16:51 -05:00
|
|
|
uglifier
|
2013-12-06 01:06:52 -05:00
|
|
|
unf
|
2013-07-07 00:30:52 -04:00
|
|
|
unicorn
|
2023-01-12 10:12:19 -05:00
|
|
|
web-push
|
2017-04-15 00:11:02 -04:00
|
|
|
webmock
|
2019-07-02 05:29:52 -04:00
|
|
|
yaml-lint
|
DEV: Chat service object initial implementation (#19814)
This is a combined work of Martin Brennan, Loïc Guitaut, and Joffrey Jaffeux.
---
This commit implements a base service object when working in chat. The documentation is available at https://discourse.github.io/discourse/chat/backend/Chat/Service.html
Generating documentation has been made as part of this commit with a bigger goal in mind of generally making it easier to dive into the chat project.
Working with services generally involves 3 parts:
- The service object itself, which is a series of steps where few of them are specialized (model, transaction, policy)
```ruby
class UpdateAge
include Chat::Service::Base
model :user, :fetch_user
policy :can_see_user
contract
step :update_age
class Contract
attribute :age, :integer
end
def fetch_user(user_id:, **)
User.find_by(id: user_id)
end
def can_see_user(guardian:, **)
guardian.can_see_user(user)
end
def update_age(age:, **)
user.update!(age: age)
end
end
```
- The `with_service` controller helper, handling success and failure of the service within a service and making easy to return proper response to it from the controller
```ruby
def update
with_service(UpdateAge) do
on_success { render_serialized(result.user, BasicUserSerializer, root: "user") }
end
end
```
- Rspec matchers and steps inspector, improving the dev experience while creating specs for a service
```ruby
RSpec.describe(UpdateAge) do
subject(:result) do
described_class.call(guardian: guardian, user_id: user.id, age: age)
end
fab!(:user) { Fabricate(:user) }
fab!(:current_user) { Fabricate(:admin) }
let(:guardian) { Guardian.new(current_user) }
let(:age) { 1 }
it { expect(user.reload.age).to eq(age) }
end
```
Note in case of unexpected failure in your spec, the output will give all the relevant information:
```
1) UpdateAge when no channel_id is given is expected to fail to find a model named 'user'
Failure/Error: it { is_expected.to fail_to_find_a_model(:user) }
Expected model 'foo' (key: 'result.model.user') was not found in the result object.
[1/4] [model] 'user' ❌
[2/4] [policy] 'can_see_user'
[3/4] [contract] 'default'
[4/4] [step] 'update_age'
/Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/update_age.rb:32:in `fetch_user': missing keyword: :user_id (ArgumentError)
from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:202:in `instance_exec'
from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:202:in `call'
from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:219:in `call'
from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:417:in `block in run!'
from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:417:in `each'
from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:417:in `run!'
from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:411:in `run'
from <internal:kernel>:90:in `tap'
from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:302:in `call'
from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/spec/services/update_age_spec.rb:15:in `block (3 levels) in <main>'
```
2023-02-13 07:09:57 -05:00
|
|
|
yard
|
2024-09-09 11:14:39 -04:00
|
|
|
zeitwerk
|
2015-09-10 00:37:46 -04:00
|
|
|
|
|
|
|
BUNDLED WITH
|
2024-09-09 11:14:39 -04:00
|
|
|
2.5.18
|