From f2f8998df69eedaf596be4ca6602d5d7625d823a Mon Sep 17 00:00:00 2001 From: Melody Date: Tue, 4 Jun 2024 13:43:28 -0400 Subject: [PATCH] fixup: wip --- Gemfile | 4 +- Gemfile.lock | 257 +++++++++--------- .../odk/condition_group_decorator_spec.rb | 2 +- .../odk/form_item_decorator_spec.rb | 2 +- spec/jobs/dedupe_job_spec.rb | 2 +- spec/models/sms/decoder_spec.rb | 2 +- spec/rails_helper.rb | 23 +- spec/requests/media/odk_response_spec.rb | 16 +- spec/requests/odk/submission_spec.rb | 8 +- spec/support/configs/database_cleaner.rb | 33 --- ...spec_helpers.rb => system_spec_helpers.rb} | 2 +- spec/{features => system}/broadcasts_spec.rb | 2 +- spec/{features => system}/dashboard_spec.rb | 2 +- spec/{features => system}/form_hint_spec.rb | 2 +- .../forms/form/form_export_spec.rb | 2 +- .../form/form_status_and_version_spec.rb | 2 +- .../forms/form/item_edit_spec.rb | 2 +- .../forms/form/printable_spec.rb | 2 +- .../forms/form_item/constraints_form_spec.rb | 2 +- .../form_item/display_logic_form_spec.rb | 2 +- .../forms/form_item/qing_group_form_spec.rb | 2 +- .../forms/form_item/questionings_form_spec.rb | 0 .../forms/form_item/skip_logic_form_spec.rb | 2 +- .../forms/option_set/option_sets_spec.rb | 2 +- .../forms/question/question_form_spec.rb | 0 .../forms/question/question_index_spec.rb | 2 +- .../forms/question/question_tag_spec.rb | 2 +- .../locale_change_spec.rb | 2 +- .../login_instructions_spec.rb | 2 +- .../mission_and_mode_switching_spec.rb | 2 +- .../{features => system}/offline_mode_spec.rb | 2 +- .../operations/operations_panel_spec.rb | 2 +- .../option_sets/option_set_import_spec.rb | 2 +- .../questions/question_import_spec.rb | 2 +- .../remember_context_spec.rb | 2 +- .../reports/report_generation_spec.rb | 2 +- .../responses/csv_export_spec.rb | 4 +- .../responses/display_logic_spec.rb | 2 +- .../responses/enketo_spec.rb | 2 +- .../responses/file_upload_spec.rb | 2 +- .../form_rendering_and_submission_spec.rb | 4 +- .../responses/index_spec.rb | 2 +- .../responses/location_picker_spec.rb | 2 +- .../responses/odata_export_spec.rb | 2 +- .../responses/read_only_spec.rb | 2 +- .../responses/reviewer_notes_spec.rb | 2 +- .../responses/skip_logic_spec.rb | 2 +- .../search/question_search_spec.rb | 2 +- .../search/response_search_spec.rb | 2 +- .../search/sms/message_search_spec.rb | 2 +- .../search/user_search_spec.rb | 2 +- .../settings_regenerable_field_spec.rb | 2 +- .../settings/sms_settings_form_spec.rb | 2 +- .../sms/sms_console_spec.rb | 2 +- .../sms/sms_guide_spec.rb | 2 +- .../sms/sms_index_spec.rb | 2 +- .../{features => system}/translatable_spec.rb | 2 +- spec/{features => system}/users/login_spec.rb | 2 +- .../users/password_reset_spec.rb | 2 +- .../users/user_bulk_destroy_spec.rb | 2 +- .../users/user_form_password_spec.rb | 2 +- .../users/user_form_spec.rb | 2 +- .../users/user_import_spec.rb | 2 +- .../users/user_index_spec.rb | 2 +- .../users/user_regenerable_field_spec.rb | 2 +- 65 files changed, 210 insertions(+), 249 deletions(-) delete mode 100644 spec/support/configs/database_cleaner.rb rename spec/support/helpers/{feature_spec_helpers.rb => system_spec_helpers.rb} (99%) rename spec/{features => system}/broadcasts_spec.rb (99%) rename spec/{features => system}/dashboard_spec.rb (98%) rename spec/{features => system}/form_hint_spec.rb (98%) rename spec/{features => system}/forms/form/form_export_spec.rb (98%) rename spec/{features => system}/forms/form/form_status_and_version_spec.rb (98%) rename spec/{features => system}/forms/form/item_edit_spec.rb (99%) rename spec/{features => system}/forms/form/printable_spec.rb (98%) rename spec/{features => system}/forms/form_item/constraints_form_spec.rb (99%) rename spec/{features => system}/forms/form_item/display_logic_form_spec.rb (99%) rename spec/{features => system}/forms/form_item/qing_group_form_spec.rb (98%) rename spec/{features => system}/forms/form_item/questionings_form_spec.rb (100%) rename spec/{features => system}/forms/form_item/skip_logic_form_spec.rb (99%) rename spec/{features => system}/forms/option_set/option_sets_spec.rb (99%) rename spec/{features => system}/forms/question/question_form_spec.rb (100%) rename spec/{features => system}/forms/question/question_index_spec.rb (94%) rename spec/{features => system}/forms/question/question_tag_spec.rb (99%) rename spec/{features => system}/locale_change_spec.rb (96%) rename spec/{features => system}/login_instructions_spec.rb (96%) rename spec/{features => system}/mission_and_mode_switching_spec.rb (95%) rename spec/{features => system}/offline_mode_spec.rb (97%) rename spec/{features => system}/operations/operations_panel_spec.rb (98%) rename spec/{features => system}/option_sets/option_set_import_spec.rb (96%) rename spec/{features => system}/questions/question_import_spec.rb (96%) rename spec/{features => system}/remember_context_spec.rb (97%) rename spec/{features => system}/reports/report_generation_spec.rb (98%) rename spec/{features => system}/responses/csv_export_spec.rb (98%) rename spec/{features => system}/responses/display_logic_spec.rb (99%) rename spec/{features => system}/responses/enketo_spec.rb (99%) rename spec/{features => system}/responses/file_upload_spec.rb (98%) rename spec/{features => system}/responses/form_rendering_and_submission_spec.rb (98%) rename spec/{features => system}/responses/index_spec.rb (99%) rename spec/{features => system}/responses/location_picker_spec.rb (96%) rename spec/{features => system}/responses/odata_export_spec.rb (92%) rename spec/{features => system}/responses/read_only_spec.rb (98%) rename spec/{features => system}/responses/reviewer_notes_spec.rb (97%) rename spec/{features => system}/responses/skip_logic_spec.rb (99%) rename spec/{features => system}/search/question_search_spec.rb (97%) rename spec/{features => system}/search/response_search_spec.rb (99%) rename spec/{features => system}/search/sms/message_search_spec.rb (96%) rename spec/{features => system}/search/user_search_spec.rb (97%) rename spec/{features => system}/settings/settings_regenerable_field_spec.rb (94%) rename spec/{features => system}/settings/sms_settings_form_spec.rb (98%) rename spec/{features => system}/sms/sms_console_spec.rb (94%) rename spec/{features => system}/sms/sms_guide_spec.rb (99%) rename spec/{features => system}/sms/sms_index_spec.rb (97%) rename spec/{features => system}/translatable_spec.rb (97%) rename spec/{features => system}/users/login_spec.rb (96%) rename spec/{features => system}/users/password_reset_spec.rb (99%) rename spec/{features => system}/users/user_bulk_destroy_spec.rb (98%) rename spec/{features => system}/users/user_form_password_spec.rb (99%) rename spec/{features => system}/users/user_form_spec.rb (98%) rename spec/{features => system}/users/user_import_spec.rb (96%) rename spec/{features => system}/users/user_index_spec.rb (98%) rename spec/{features => system}/users/user_regenerable_field_spec.rb (89%) diff --git a/Gemfile b/Gemfile index 6911da8ddd..4b056162de 100644 --- a/Gemfile +++ b/Gemfile @@ -153,9 +153,8 @@ group :development, :test do gem "factory_bot_rails", "~> 4.11" gem "mocha", "~> 1.1" - # Feature specs + # system specs gem "capybara", "~> 3.30" - gem "capybara-screenshot", "~> 1.0" gem "launchy", "~> 2.5" # For auto-opening capybara html file gem "puma", "~> 5.6" gem "selenium-webdriver", "~> 4.15.0" # TODO: Can't upgrade to 4.17 until Rails 7 + Ruby 3.3 @@ -175,7 +174,6 @@ group :development, :test do gem "annotate", "~> 3.1" gem "assert_difference", "~> 1.0" # Deprecated: Barely used, convert usage to something else. gem "awesome_print", "~> 1.6" - gem "database_cleaner", "~> 2.0" gem "db-query-matchers", "~> 0.10" gem "rubocop", "1.22.3" # Hound supported versions: http://help.houndci.com/en/articles/2461415-supported-linters gem "rubocop-rails", "~> 2.8" diff --git a/Gemfile.lock b/Gemfile.lock index 51b42f06d2..2144ff2e13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -28,35 +28,35 @@ GIT GEM remote: http://rubygems.org/ specs: - actioncable (7.1.3.2) - actionpack (= 7.1.3.2) - activesupport (= 7.1.3.2) + actioncable (7.1.3.3) + actionpack (= 7.1.3.3) + activesupport (= 7.1.3.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.3.2) - actionpack (= 7.1.3.2) - activejob (= 7.1.3.2) - activerecord (= 7.1.3.2) - activestorage (= 7.1.3.2) - activesupport (= 7.1.3.2) + actionmailbox (7.1.3.3) + actionpack (= 7.1.3.3) + activejob (= 7.1.3.3) + activerecord (= 7.1.3.3) + activestorage (= 7.1.3.3) + activesupport (= 7.1.3.3) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.1.3.2) - actionpack (= 7.1.3.2) - actionview (= 7.1.3.2) - activejob (= 7.1.3.2) - activesupport (= 7.1.3.2) + actionmailer (7.1.3.3) + actionpack (= 7.1.3.3) + actionview (= 7.1.3.3) + activejob (= 7.1.3.3) + activesupport (= 7.1.3.3) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.2) - actionpack (7.1.3.2) - actionview (= 7.1.3.2) - activesupport (= 7.1.3.2) + actionpack (7.1.3.3) + actionview (= 7.1.3.3) + activesupport (= 7.1.3.3) nokogiri (>= 1.8.5) racc rack (>= 2.2.4) @@ -66,15 +66,15 @@ GEM rails-html-sanitizer (~> 1.6) actionpack-page_caching (1.2.4) actionpack (>= 4.0.0) - actiontext (7.1.3.2) - actionpack (= 7.1.3.2) - activerecord (= 7.1.3.2) - activestorage (= 7.1.3.2) - activesupport (= 7.1.3.2) + actiontext (7.1.3.3) + actionpack (= 7.1.3.3) + activerecord (= 7.1.3.3) + activestorage (= 7.1.3.3) + activesupport (= 7.1.3.3) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.3.2) - activesupport (= 7.1.3.2) + actionview (7.1.3.3) + activesupport (= 7.1.3.3) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) @@ -84,26 +84,26 @@ GEM activemodel (>= 5.2.0) activestorage (>= 5.2.0) activesupport (>= 5.2.0) - activejob (7.1.3.2) - activesupport (= 7.1.3.2) + activejob (7.1.3.3) + activesupport (= 7.1.3.3) globalid (>= 0.3.6) - activemodel (7.1.3.2) - activesupport (= 7.1.3.2) + activemodel (7.1.3.3) + activesupport (= 7.1.3.3) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (7.1.3.2) - activemodel (= 7.1.3.2) - activesupport (= 7.1.3.2) + activerecord (7.1.3.3) + activemodel (= 7.1.3.3) + activesupport (= 7.1.3.3) timeout (>= 0.4.0) - activestorage (7.1.3.2) - actionpack (= 7.1.3.2) - activejob (= 7.1.3.2) - activerecord (= 7.1.3.2) - activesupport (= 7.1.3.2) + activestorage (7.1.3.3) + actionpack (= 7.1.3.3) + activejob (= 7.1.3.3) + activerecord (= 7.1.3.3) + activesupport (= 7.1.3.3) marcel (~> 1.0) - activesupport (7.1.3.2) + activesupport (7.1.3.3) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -113,8 +113,9 @@ GEM minitest (>= 5.1) mutex_m tzinfo (~> 2.0) - acts_as_list (1.1.0) - activerecord (>= 4.2) + acts_as_list (1.2.0) + activerecord (>= 6.1) + activesupport (>= 6.1) addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) ancestry (4.3.3) @@ -136,17 +137,17 @@ GEM execjs (~> 2) awesome_print (1.9.2) aws-eventstream (1.3.0) - aws-partitions (1.884.0) - aws-sdk-core (3.191.0) + aws-partitions (1.938.0) + aws-sdk-core (3.196.1) 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) + aws-sdk-kms (1.82.0) + aws-sdk-core (~> 3, >= 3.193.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.143.0) - aws-sdk-core (~> 3, >= 3.191.0) + aws-sdk-s3 (1.151.0) + aws-sdk-core (~> 3, >= 3.194.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.8) aws-sigv4 (1.8.0) @@ -163,13 +164,13 @@ GEM babel-transpiler (0.7.0) babel-source (>= 4.0, < 6) execjs (~> 2.0) - base64 (0.1.1) - bigdecimal (3.1.7) - binding_of_caller (1.0.0) - debug_inspector (>= 0.0.1) + base64 (0.2.0) + bigdecimal (3.1.8) + binding_of_caller (1.0.1) + debug_inspector (>= 1.2.0) bluecloth (2.2.0) blueprinter (0.25.3) - bootsnap (1.18.1) + bootsnap (1.18.3) msgpack (~> 1.2) bootstrap (4.6.2) autoprefixer-rails (>= 9.1.0) @@ -180,7 +181,7 @@ GEM activesupport (>= 3.0.0) uniform_notifier (~> 1.11) byebug (11.1.3) - cancancan (3.5.0) + cancancan (3.6.1) capybara (3.40.0) addressable matrix @@ -190,9 +191,6 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - capybara-screenshot (1.0.26) - capybara (>= 1.0, < 4) - launchy choice (0.2.0) chronic (0.10.2) chunky_png (1.4.0) @@ -206,21 +204,14 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.2.3) + concurrent-ruby (1.3.1) connection_pool (2.4.1) - crack (0.4.6) + crack (1.0.0) bigdecimal rexml crass (1.0.6) daemons (1.4.1) - dalli (3.2.7) - base64 - database_cleaner (2.0.2) - database_cleaner-active_record (>= 2, < 3) - database_cleaner-active_record (2.1.0) - activerecord (>= 5.a) - database_cleaner-core (~> 2.0.0) - database_cleaner-core (2.0.1) + dalli (3.2.8) date (3.3.4) db-query-matchers (0.12.0) activesupport (>= 4.0, < 7.2) @@ -288,9 +279,9 @@ GEM faraday-retry (1.0.3) faraday_middleware (1.2.0) faraday (~> 1.0) - ffi (1.16.3) - ffi-compiler (1.0.1) - ffi (>= 1.0.0) + ffi (1.17.0) + ffi-compiler (1.3.2) + ffi (>= 1.15.5) rake fix-db-schema-conflicts (3.1.1) rubocop (>= 0.38.0) @@ -307,9 +298,9 @@ GEM ruby_parser (~> 3.10) hashdiff (1.1.0) http-accept (1.7.0) - http-cookie (1.0.5) + http-cookie (1.0.6) domain_name (~> 0.5) - i18n (1.14.4) + i18n (1.14.5) concurrent-ruby (~> 1.0) i18n-country-translations (1.4.1) i18n (>= 0.9.3, < 2) @@ -322,8 +313,8 @@ GEM immigrant (0.3.6) activerecord (>= 3.0) io-console (0.7.2) - irb (1.12.0) - rdoc + irb (1.13.1) + rdoc (>= 4.0.0) reline (>= 0.4.2) iso-639 (0.3.6) jmespath (1.6.2) @@ -335,13 +326,14 @@ GEM rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (2.7.1) - jwt (2.7.1) + json (2.7.2) + jwt (2.8.1) + base64 launchy (2.5.2) addressable (~> 2.8) - letter_opener (1.8.1) - launchy (>= 2.2, < 3) - listen (3.8.0) + letter_opener (1.10.0) + launchy (>= 2.2, < 4) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.22.0) @@ -354,36 +346,36 @@ GEM net-smtp marcel (1.0.4) matrix (0.4.2) - method_source (1.0.0) + method_source (1.1.0) mime-types (3.5.2) mime-types-data (~> 3.2015) - mime-types-data (3.2023.1205) + mime-types-data (3.2024.0507) mini_magick (4.12.0) mini_mime (1.1.5) - mini_portile2 (2.8.5) - minitest (5.22.3) + mini_portile2 (2.8.7) + minitest (5.23.1) mocha (1.16.1) msgpack (1.7.2) - multipart-post (2.3.0) + multipart-post (2.4.1) mutex_m (0.2.0) net-http-persistent (4.0.2) connection_pool (~> 2.2) - net-imap (0.4.10) + net-imap (0.4.12) date net-protocol net-pop (0.1.2) net-protocol net-protocol (0.2.2) timeout - net-smtp (0.4.0.1) + net-smtp (0.5.0) net-protocol netrc (0.11.0) - nio4r (2.7.0) - nokogiri (1.16.3) + nio4r (2.7.3) + nokogiri (1.16.5) mini_portile2 (~> 2.8.2) racc (~> 1.4) parallel (1.24.0) - parser (3.3.0.5) + parser (3.3.2.0) ast (~> 2.4.1) racc pg (1.4.6) @@ -405,11 +397,11 @@ GEM pry (>= 0.10.4) psych (5.1.2) stringio - public_suffix (5.0.4) + public_suffix (5.0.5) puma (5.6.8) nio4r (~> 2.0) - racc (1.7.3) - rack (2.2.8.1) + racc (1.8.0) + rack (2.2.9) rack-attack (6.7.0) rack (>= 1.0, < 4) rack-proxy (0.7.7) @@ -421,20 +413,20 @@ GEM rackup (1.0.0) rack (< 3) webrick - rails (7.1.3.2) - actioncable (= 7.1.3.2) - actionmailbox (= 7.1.3.2) - actionmailer (= 7.1.3.2) - actionpack (= 7.1.3.2) - actiontext (= 7.1.3.2) - actionview (= 7.1.3.2) - activejob (= 7.1.3.2) - activemodel (= 7.1.3.2) - activerecord (= 7.1.3.2) - activestorage (= 7.1.3.2) - activesupport (= 7.1.3.2) + rails (7.1.3.3) + actioncable (= 7.1.3.3) + actionmailbox (= 7.1.3.3) + actionmailer (= 7.1.3.3) + actionpack (= 7.1.3.3) + actiontext (= 7.1.3.3) + actionview (= 7.1.3.3) + activejob (= 7.1.3.3) + activemodel (= 7.1.3.3) + activerecord (= 7.1.3.3) + activestorage (= 7.1.3.3) + activesupport (= 7.1.3.3) bundler (>= 1.15.0) - railties (= 7.1.3.2) + railties (= 7.1.3.3) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -454,22 +446,22 @@ GEM rails-i18n (7.0.9) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.1.3.2) - actionpack (= 7.1.3.2) - activesupport (= 7.1.3.2) + railties (7.1.3.3) + actionpack (= 7.1.3.3) + activesupport (= 7.1.3.3) irb rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.1.0) + rake (13.2.1) random_data (1.6.0) rb-fsevent (0.11.2) - rb-inotify (0.10.1) + rb-inotify (0.11.1) ffi (~> 1.0) rdiscount (2.2.7.3) - rdoc (6.6.3.1) + rdoc (6.7.0) psych (>= 4.0.0) react-rails (2.7.1) babel-transpiler (>= 0.7.0) @@ -479,10 +471,10 @@ GEM tilt recaptcha (3.4.0) json - regexp_parser (2.9.0) - reline (0.4.3) + regexp_parser (2.9.2) + reline (0.5.8) io-console (~> 0.5) - request_store (1.5.1) + request_store (1.7.0) rack (>= 1.4) responders (3.1.1) actionpack (>= 5.2) @@ -494,7 +486,8 @@ GEM netrc (~> 0.8) reverse_markdown (2.1.1) nokogiri - rexml (3.2.6) + rexml (3.2.8) + strscan (>= 3.0.9) rqrcode (1.2.0) chunky_png (~> 1.0) rqrcode_core (~> 0.2) @@ -512,7 +505,7 @@ GEM rspec-support (~> 3.13.0) rspec-github (2.4.0) rspec-core (~> 3.0) - rspec-mocks (3.13.0) + rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-rails (6.1.2) @@ -533,8 +526,8 @@ GEM rubocop-ast (>= 1.12.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) rubocop-rails (2.15.2) activesupport (>= 4.2.0) rack (>= 1.1) @@ -548,9 +541,9 @@ GEM ruby-jmeter (3.1.08) nokogiri rest-client - ruby-ole (1.2.12.2) + ruby-ole (1.2.13.1) ruby-progressbar (1.13.0) - ruby-vips (2.2.0) + ruby-vips (2.2.1) ffi (~> 1.12) ruby2_keywords (0.0.5) ruby2ruby (2.5.0) @@ -568,7 +561,7 @@ GEM sprockets (> 3.0) sprockets-rails tilt - scout_apm (5.3.5) + scout_apm (5.3.8) parser scrypt (3.0.7) ffi-compiler (>= 1.0, < 2.0) @@ -578,10 +571,11 @@ GEM rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) semantic_range (3.0.0) - sentry-rails (5.16.1) + sentry-rails (5.17.3) railties (>= 5.0) - sentry-ruby (~> 5.16.1) - sentry-ruby (5.16.1) + sentry-ruby (~> 5.17.3) + sentry-ruby (5.17.3) + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) sexp_processor (4.17.1) spinjs-rails (1.3) @@ -589,18 +583,20 @@ GEM spreadsheet (1.3.1) bigdecimal ruby-ole - sprockets (3.7.2) + sprockets (3.7.3) + base64 concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - stringio (3.0.1) + stringio (3.1.0) + strscan (3.1.0) sync (0.5.0) - sys-filesystem (1.4.4) + sys-filesystem (1.4.5) ffi (~> 1.1) - term-ansicolor (1.7.1) + term-ansicolor (1.8.0) tins (~> 1.0) terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) @@ -608,7 +604,8 @@ GEM tilt (2.3.0) timecop (0.9.6) timeout (0.4.1) - tins (1.32.1) + tins (1.33.0) + bigdecimal sync twilio-ruby (6.9.1) faraday (>= 0.9, < 3.0) @@ -625,8 +622,8 @@ GEM activesupport (>= 3) railties (>= 3) yard (~> 0.9.20) - warning (1.3.0) - webmock (3.19.1) + warning (1.4.0) + webmock (3.23.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -655,7 +652,7 @@ GEM xpath (3.2.0) nokogiri (~> 1.8) yard (0.9.36) - zeitwerk (2.6.13) + zeitwerk (2.6.15) PLATFORMS ruby @@ -681,12 +678,10 @@ DEPENDENCIES bullet (~> 7.1) cancancan (~> 3.1) capybara (~> 3.30) - capybara-screenshot (~> 1.0) clipboard-rails (~> 1.7) closure_tree! daemons (~> 1.2) dalli (~> 3.2) - database_cleaner (~> 2.0) db-query-matchers (~> 0.10) delayed_job_active_record (~> 4.1) descriptive_statistics (~> 2.5) diff --git a/spec/decorators/odk/condition_group_decorator_spec.rb b/spec/decorators/odk/condition_group_decorator_spec.rb index 35b21b82ad..f3db56409d 100644 --- a/spec/decorators/odk/condition_group_decorator_spec.rb +++ b/spec/decorators/odk/condition_group_decorator_spec.rb @@ -3,7 +3,7 @@ require "rails_helper" module ODK - describe ConditionGroupDecorator, :odk, :reset_factory_sequences, database_cleaner: :truncate do + describe ConditionGroupDecorator, :odk, :reset_factory_sequences do include_context "odk rendering" let(:result) { decorate(condition_group).to_odk } diff --git a/spec/decorators/odk/form_item_decorator_spec.rb b/spec/decorators/odk/form_item_decorator_spec.rb index f0b81d34c5..3502a3c887 100644 --- a/spec/decorators/odk/form_item_decorator_spec.rb +++ b/spec/decorators/odk/form_item_decorator_spec.rb @@ -3,7 +3,7 @@ require "rails_helper" module ODK - describe FormItemDecorator, :odk, :reset_factory_sequences, database_cleaner: :truncate do + describe FormItemDecorator, :odk, :reset_factory_sequences do include_context "odk rendering" describe "xpath methods" do diff --git a/spec/jobs/dedupe_job_spec.rb b/spec/jobs/dedupe_job_spec.rb index 16bf11c132..5d741a9d25 100644 --- a/spec/jobs/dedupe_job_spec.rb +++ b/spec/jobs/dedupe_job_spec.rb @@ -197,7 +197,7 @@ ) end - it "should dedupe correctly", database_cleaner: :truncate do + it "should dedupe correctly" do # Start with two existing dupes, but are clean described_class.perform_now expect(Response.all.count).to eq(2) diff --git a/spec/models/sms/decoder_spec.rb b/spec/models/sms/decoder_spec.rb index 088ca96a09..9415ddc7c2 100644 --- a/spec/models/sms/decoder_spec.rb +++ b/spec/models/sms/decoder_spec.rb @@ -619,7 +619,7 @@ end end - describe "complex hierarchy construction", database_cleaner: :truncate do + describe "complex hierarchy construction" do it "builds response tree for nested groups with repeat" do # QingGroup (root) # QingGroup diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 8778db3778..9cc1af699b 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -8,7 +8,6 @@ require "capybara/rspec" require "capybara/rails" require "selenium-webdriver" -require "capybara-screenshot/rspec" require "cancan/matchers" require "fileutils" require "vcr" @@ -27,13 +26,6 @@ end end -Capybara.javascript_driver = :selenium_chrome_headless - -# Add support for Headless Chrome screenshots. -Capybara::Screenshot.register_driver(:selenium_chrome_headless) do |driver, path| - driver.browser.save_screenshot(path) -end - # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[Rails.root.join("spec/support/**/*.rb")].sort.each { |f| require f } @@ -53,7 +45,7 @@ # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false # instead of true. - config.use_transactional_fixtures = false + config.use_transactional_fixtures = true # If true, the base class of anonymous controllers will be inferred # automatically. This will be the default behavior in future versions of @@ -72,7 +64,7 @@ config.infer_spec_type_from_file_location! config.include(AssertDifference) - config.include(FeatureSpecHelpers, type: :feature) + config.include(SystemSpecHelpers, type: :system) config.include(GeneralSpecHelpers) config.include(ModelSpecHelpers, type: :model) config.include(RequestSpecHelpers, type: :request) @@ -88,6 +80,15 @@ FileUtils.mkdir_p(Rails.root.join("tmp")) end + # Set up system tests + config.before(:each, type: :system) do + driven_by(:rack_test) + end + + config.before(:each, type: :system, js: true) do + driven_by :selenium_chrome_headless + end + # We have to use around so that this block runs before arounds and befores in actual specs. config.around(:each) do |example| # Previous specs might leave locale set to something else, which can cause issues. @@ -113,7 +114,7 @@ # Print browser logs to console if they are non-empty. # You MUST use console.warn or console.error for this to work. - config.after(:each, type: :feature, js: true) do + config.after(:each, type: :system, js: true) do # logs = page.driver.browser.manage.logs.get(:browser).join("\n") logs = "" unless logs.strip.empty? diff --git a/spec/requests/media/odk_response_spec.rb b/spec/requests/media/odk_response_spec.rb index 5f18bb9942..f54645ce33 100644 --- a/spec/requests/media/odk_response_spec.rb +++ b/spec/requests/media/odk_response_spec.rb @@ -28,7 +28,7 @@ FileUtils.rm_rf(ResponsesController::TMP_UPLOADS_PATH) end - it "should successfully process the submission and clean up", database_cleaner: :truncate do + it "should successfully process the submission and clean up" do image = Rack::Test::UploadedFile.new(image_fixture("the_swing.jpg"), "image/jpeg") submission_file = prepare_and_upload_submission_file("single_part_media.xml") @@ -46,7 +46,7 @@ expect(FileUtils.rm(tmp_files)).to be_empty end - it "should safely ignore simple duplicates", database_cleaner: :truncate do + it "should safely ignore simple duplicates" do # Original submission_file = prepare_and_upload_submission_file("single_question.xml") post submission_path, params: {xml_submission_file: submission_file}, headers: auth_header @@ -99,7 +99,7 @@ context "with multiple parts" do let(:form) { create(:form, :live, question_types: %w[text image sketch]) } - it "should successfully process the submission", database_cleaner: :truncate do + it "should successfully process the submission" do image = Rack::Test::UploadedFile.new(image_fixture("the_swing.jpg"), "image/jpeg") image2 = Rack::Test::UploadedFile.new(image_fixture("sassafras.jpg"), "image/jpeg") submission_file = prepare_and_upload_submission_file("multiple_part_media.xml") @@ -117,7 +117,7 @@ context "with multiple parts, duplicate submissions for first part" do let(:form) { create(:form, :live, question_types: %w[text image sketch]) } - it "should ignore the second submission", database_cleaner: :truncate do + it "should ignore the second submission" do image = Rack::Test::UploadedFile.new(image_fixture("the_swing.jpg"), "image/jpeg") image2 = Rack::Test::UploadedFile.new(image_fixture("sassafras.jpg"), "image/jpeg") submission_file = prepare_and_upload_submission_file("multiple_part_media.xml") @@ -140,7 +140,7 @@ context "with multiple parts, duplicate submissions for second part" do let(:form) { create(:form, :live, question_types: %w[text image sketch]) } - it "should ignore the third submission as it is a duplicate", database_cleaner: :truncate do + it "should ignore the third submission as it is a duplicate" do image = Rack::Test::UploadedFile.new(image_fixture("the_swing.jpg"), "image/jpeg") image2 = Rack::Test::UploadedFile.new(image_fixture("sassafras.jpg"), "image/jpeg") submission_file = prepare_and_upload_submission_file("multiple_part_media.xml") @@ -163,7 +163,7 @@ context "with multiple parts, duplicate first submission at the end" do let(:form) { create(:form, :live, question_types: %w[text image sketch]) } - it "should successfully process the submission", database_cleaner: :truncate do + it "should successfully process the submission" do image = Rack::Test::UploadedFile.new(image_fixture("the_swing.jpg"), "image/jpeg") image2 = Rack::Test::UploadedFile.new(image_fixture("sassafras.jpg"), "image/jpeg") submission_file = prepare_and_upload_submission_file("multiple_part_media.xml") @@ -186,7 +186,7 @@ context "with multiple parts, duplicate xml/image and no response" do let(:form) { create(:form, :live, question_types: %w[text image sketch]) } - it "should successfully process the submission", database_cleaner: :truncate do + it "should successfully process the submission" do image = Rack::Test::UploadedFile.new(image_fixture("the_swing.jpg"), "image/jpeg") submission_file = prepare_and_upload_submission_file("multiple_part_media.xml") submission_file2 = prepare_and_upload_submission_file("multiple_part_media.xml") @@ -207,7 +207,7 @@ context "multiple media attachments in multiple responses" do let(:form) { create(:form, :live, question_types: %w[text image sketch image]) } - it "should successfully process the submission", database_cleaner: :truncate do + it "should successfully process the submission" do image = Rack::Test::UploadedFile.new(image_fixture("the_swing.jpg"), "image/jpeg") image2 = Rack::Test::UploadedFile.new(image_fixture("sassafras.jpg"), "image/jpeg") image3 = Rack::Test::UploadedFile.new(image_fixture("sassafras2.jpg"), "image/jpeg") diff --git a/spec/requests/odk/submission_spec.rb b/spec/requests/odk/submission_spec.rb index 7c485c135b..f2a9434cb2 100644 --- a/spec/requests/odk/submission_spec.rb +++ b/spec/requests/odk/submission_spec.rb @@ -43,14 +43,14 @@ end context "normal submission" do - it "should work and have mission set to current mission", database_cleaner: :truncate do + it "should work and have mission set to current mission" do post(submission_path, params: request_params, headers: auth_header) expect(response).to have_http_status(:created) expect(nemo_response.mission).to eq(mission) expect(nemo_response.device_id).to eq(nil) end - it "should save device ID if present", database_cleaner: :truncate do + it "should save device ID if present" do post("#{submission_path}?deviceID=test", params: request_params, headers: auth_header) expect(response).to have_http_status(:created) expect(nemo_response.device_id).to eq("test") @@ -139,7 +139,7 @@ form.c[1].update!(required: true) end - it "should still accept response", database_cleaner: :truncate do + it "should still accept response" do post(submission_path, params: request_params, headers: auth_header) expect(response).to have_http_status(:created) expect(nemo_response.children.size).to eq(1) @@ -163,7 +163,7 @@ end let!(:question_types) { %w[text text text text] } - it "should return created", database_cleaner: :truncate do + it "should return created" do prepare_odk_response_fixture("simple_response", form1, values: xml_values, formver: "202211") r1 r1_original_path = Rails.root.join("tmp/odk/responses/simple_response/simple_response.xml") diff --git a/spec/support/configs/database_cleaner.rb b/spec/support/configs/database_cleaner.rb deleted file mode 100644 index 4a1231b142..0000000000 --- a/spec/support/configs/database_cleaner.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -RSpec.configure do |config| - config.before(:suite) do - DatabaseCleaner.clean_with(:truncation) - end - - config.before(:each) do - DatabaseCleaner.strategy = :transaction - end - - config.before(:each, js: true) do - DatabaseCleaner.strategy = :truncation - DatabaseCleaner.clean - end - - config.before(:each, database_cleaner: :truncate) do - DatabaseCleaner.strategy = :truncation - DatabaseCleaner.clean - end - - config.after(:all) do - DatabaseCleaner.clean_with(:truncation) - end - - config.before(:each) do |example| - DatabaseCleaner.start if example.metadata[:database_cleaner] != :all - end - - config.append_after(:each) do |example| - DatabaseCleaner.clean if example.metadata[:database_cleaner] != :all - end -end diff --git a/spec/support/helpers/feature_spec_helpers.rb b/spec/support/helpers/system_spec_helpers.rb similarity index 99% rename from spec/support/helpers/feature_spec_helpers.rb rename to spec/support/helpers/system_spec_helpers.rb index 7aa0d2297e..00d4b39370 100644 --- a/spec/support/helpers/feature_spec_helpers.rb +++ b/spec/support/helpers/system_spec_helpers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module FeatureSpecHelpers +module SystemSpecHelpers ALERT_CLASSES = { notice: "alert-info", success: "alert-success", diff --git a/spec/features/broadcasts_spec.rb b/spec/system/broadcasts_spec.rb similarity index 99% rename from spec/features/broadcasts_spec.rb rename to spec/system/broadcasts_spec.rb index f1d3ae9cad..83c43a54a8 100644 --- a/spec/features/broadcasts_spec.rb +++ b/spec/system/broadcasts_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "broadcasts", :sms, js: true do +describe "broadcasts", :sms, js: true do include_context "search" let(:max_user_dropdown_results) { BroadcastsController::USERS_OR_GROUPS_PER_PAGE * 2 } let!(:user) { create(:user, role_name: "staffer") } diff --git a/spec/features/dashboard_spec.rb b/spec/system/dashboard_spec.rb similarity index 98% rename from spec/features/dashboard_spec.rb rename to spec/system/dashboard_spec.rb index 5ce9a59d4b..68eb0d0cbc 100644 --- a/spec/features/dashboard_spec.rb +++ b/spec/system/dashboard_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "dashboard", js: true do +describe "dashboard", js: true do let(:dashboard_path) { mission_root_path(mission_name: get_mission.compact_name, locale: "en") } before do diff --git a/spec/features/form_hint_spec.rb b/spec/system/form_hint_spec.rb similarity index 98% rename from spec/features/form_hint_spec.rb rename to spec/system/form_hint_spec.rb index 149f85bd7d..4e22c4320b 100644 --- a/spec/features/form_hint_spec.rb +++ b/spec/system/form_hint_spec.rb @@ -3,7 +3,7 @@ # Tests the hint popovers in regular forms and modal forms. require "rails_helper" -feature "form hints", js: true do +describe "form hints", js: true do let(:form) { create(:form, question_types: %w[integer image image]) } let(:mission_name) { get_mission.compact_name } let(:user) { create(:user, role_name: "coordinator") } diff --git a/spec/features/forms/form/form_export_spec.rb b/spec/system/forms/form/form_export_spec.rb similarity index 98% rename from spec/features/forms/form/form_export_spec.rb rename to spec/system/forms/form/form_export_spec.rb index 6995adc28f..aac13aa566 100644 --- a/spec/features/forms/form/form_export_spec.rb +++ b/spec/system/forms/form/form_export_spec.rb @@ -4,7 +4,7 @@ require "fileutils" require "zip" -feature "form export" do +describe "form export" do context "single form" do let(:user) { create(:user, role_name: "coordinator") } let(:form) { create(:form, :live, question_types: %w[text]) } diff --git a/spec/features/forms/form/form_status_and_version_spec.rb b/spec/system/forms/form/form_status_and_version_spec.rb similarity index 98% rename from spec/features/forms/form/form_status_and_version_spec.rb rename to spec/system/forms/form/form_status_and_version_spec.rb index 3d98bb850e..c41a3e273a 100644 --- a/spec/features/forms/form/form_status_and_version_spec.rb +++ b/spec/system/forms/form/form_status_and_version_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "form status and version display and changes", js: true do +describe "form status and version display and changes", js: true do let!(:form) { create(:form, :draft, name: "Myform") } let(:user) { create(:user, role_name: "coordinator") } diff --git a/spec/features/forms/form/item_edit_spec.rb b/spec/system/forms/form/item_edit_spec.rb similarity index 99% rename from spec/features/forms/form/item_edit_spec.rb rename to spec/system/forms/form/item_edit_spec.rb index 401a9876ab..6435d9ab07 100644 --- a/spec/features/forms/form/item_edit_spec.rb +++ b/spec/system/forms/form/item_edit_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "forms", js: true do +describe "forms", js: true do INDENT = 40 let!(:user) { create(:user) } diff --git a/spec/features/forms/form/printable_spec.rb b/spec/system/forms/form/printable_spec.rb similarity index 98% rename from spec/features/forms/form/printable_spec.rb rename to spec/system/forms/form/printable_spec.rb index 88fbd64620..b527d170b0 100644 --- a/spec/features/forms/form/printable_spec.rb +++ b/spec/system/forms/form/printable_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "forms", js: true do +describe "forms", js: true do let(:user) { create(:user) } let(:form) do create(:form, name: "Foo", question_types: %w[integer multilevel_select_one select_one integer]) diff --git a/spec/features/forms/form_item/constraints_form_spec.rb b/spec/system/forms/form_item/constraints_form_spec.rb similarity index 99% rename from spec/features/forms/form_item/constraints_form_spec.rb rename to spec/system/forms/form_item/constraints_form_spec.rb index c4e8b9761c..894c9142b5 100644 --- a/spec/features/forms/form_item/constraints_form_spec.rb +++ b/spec/system/forms/form_item/constraints_form_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "constraints form fields", js: true do +describe "constraints form fields", js: true do let!(:user) { create(:admin) } let(:standard) { false } let(:traits) { standard ? [:standard] : [] } diff --git a/spec/features/forms/form_item/display_logic_form_spec.rb b/spec/system/forms/form_item/display_logic_form_spec.rb similarity index 99% rename from spec/features/forms/form_item/display_logic_form_spec.rb rename to spec/system/forms/form_item/display_logic_form_spec.rb index 1bcfd51eb8..499e0ffc80 100644 --- a/spec/features/forms/form_item/display_logic_form_spec.rb +++ b/spec/system/forms/form_item/display_logic_form_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "display logic form fields", js: true do +describe "display logic form fields", js: true do let!(:user) { create(:admin) } let(:standard) { false } let(:traits) { standard ? [:standard] : [] } diff --git a/spec/features/forms/form_item/qing_group_form_spec.rb b/spec/system/forms/form_item/qing_group_form_spec.rb similarity index 98% rename from spec/features/forms/form_item/qing_group_form_spec.rb rename to spec/system/forms/form_item/qing_group_form_spec.rb index ea164108a9..ab48ca5656 100644 --- a/spec/features/forms/form_item/qing_group_form_spec.rb +++ b/spec/system/forms/form_item/qing_group_form_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "adding and editing qing group on form", js: true do +describe "adding and editing qing group on form", js: true do let!(:user) { create(:user) } let!(:form) do create(:form, name: "Foo", diff --git a/spec/features/forms/form_item/questionings_form_spec.rb b/spec/system/forms/form_item/questionings_form_spec.rb similarity index 100% rename from spec/features/forms/form_item/questionings_form_spec.rb rename to spec/system/forms/form_item/questionings_form_spec.rb diff --git a/spec/features/forms/form_item/skip_logic_form_spec.rb b/spec/system/forms/form_item/skip_logic_form_spec.rb similarity index 99% rename from spec/features/forms/form_item/skip_logic_form_spec.rb rename to spec/system/forms/form_item/skip_logic_form_spec.rb index 5a0a170604..f27af92150 100644 --- a/spec/features/forms/form_item/skip_logic_form_spec.rb +++ b/spec/system/forms/form_item/skip_logic_form_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "skip logic form fields", js: true do +describe "skip logic form fields", js: true do let!(:user) { create(:admin) } let(:standard) { false } let(:traits) { standard ? [:standard] : [] } diff --git a/spec/features/forms/option_set/option_sets_spec.rb b/spec/system/forms/option_set/option_sets_spec.rb similarity index 99% rename from spec/features/forms/option_set/option_sets_spec.rb rename to spec/system/forms/option_set/option_sets_spec.rb index b23373c5f1..fc94ed8395 100644 --- a/spec/features/forms/option_set/option_sets_spec.rb +++ b/spec/system/forms/option_set/option_sets_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "option set" do +describe "option set" do let(:user) { create(:user, role_name: "coordinator") } before do diff --git a/spec/features/forms/question/question_form_spec.rb b/spec/system/forms/question/question_form_spec.rb similarity index 100% rename from spec/features/forms/question/question_form_spec.rb rename to spec/system/forms/question/question_form_spec.rb diff --git a/spec/features/forms/question/question_index_spec.rb b/spec/system/forms/question/question_index_spec.rb similarity index 94% rename from spec/features/forms/question/question_index_spec.rb rename to spec/system/forms/question/question_index_spec.rb index f2fec13b6f..e1768ffcf6 100644 --- a/spec/features/forms/question/question_index_spec.rb +++ b/spec/system/forms/question/question_index_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "question index", js: true do +describe "question index", js: true do let(:admin) { create(:admin) } let(:mission) { get_mission } let!(:questions) { create_list(:question, 3, canonical_name: "duplicated", mission: mission) } diff --git a/spec/features/forms/question/question_tag_spec.rb b/spec/system/forms/question/question_tag_spec.rb similarity index 99% rename from spec/features/forms/question/question_tag_spec.rb rename to spec/system/forms/question/question_tag_spec.rb index 81704af544..7ac33b2d26 100644 --- a/spec/features/forms/question/question_tag_spec.rb +++ b/spec/system/forms/question/question_tag_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "question tags" do +describe "question tags" do include_context "search" let!(:mission) { get_mission } diff --git a/spec/features/locale_change_spec.rb b/spec/system/locale_change_spec.rb similarity index 96% rename from spec/features/locale_change_spec.rb rename to spec/system/locale_change_spec.rb index da263485c5..b5673349f3 100644 --- a/spec/features/locale_change_spec.rb +++ b/spec/system/locale_change_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "locale change", js: true do +describe "locale change", js: true do let!(:user) { create(:user) } let!(:form) { create(:form, :live) } diff --git a/spec/features/login_instructions_spec.rb b/spec/system/login_instructions_spec.rb similarity index 96% rename from spec/features/login_instructions_spec.rb rename to spec/system/login_instructions_spec.rb index 9466012259..b12dfe2d71 100644 --- a/spec/features/login_instructions_spec.rb +++ b/spec/system/login_instructions_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "login instructions" do +describe "login instructions" do let(:enumerator) { create(:user, role_name: :enumerator, mission: mission) } let(:mission) { get_mission } let(:actor) { create(:admin, mission: mission) } diff --git a/spec/features/mission_and_mode_switching_spec.rb b/spec/system/mission_and_mode_switching_spec.rb similarity index 95% rename from spec/features/mission_and_mode_switching_spec.rb rename to spec/system/mission_and_mode_switching_spec.rb index 0fbc5d1cc3..cbbdb3fd83 100644 --- a/spec/features/mission_and_mode_switching_spec.rb +++ b/spec/system/mission_and_mode_switching_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "switching between missions and modes", js: true do +describe "switching between missions and modes", js: true do let!(:mission1) { create(:mission) } let!(:mission2) { create(:mission) } let!(:user) { create(:user, mission: mission1) } diff --git a/spec/features/offline_mode_spec.rb b/spec/system/offline_mode_spec.rb similarity index 97% rename from spec/features/offline_mode_spec.rb rename to spec/system/offline_mode_spec.rb index 647a5bcb05..2c04b02fd7 100644 --- a/spec/features/offline_mode_spec.rb +++ b/spec/system/offline_mode_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "offline mode" do +describe "offline mode" do let(:user) { create(:admin) } around do |example| diff --git a/spec/features/operations/operations_panel_spec.rb b/spec/system/operations/operations_panel_spec.rb similarity index 98% rename from spec/features/operations/operations_panel_spec.rb rename to spec/system/operations/operations_panel_spec.rb index e068f4da18..de4daf3dc4 100644 --- a/spec/features/operations/operations_panel_spec.rb +++ b/spec/system/operations/operations_panel_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "operations panel" do +describe "operations panel" do let!(:admin) { create(:admin) } let(:mission) { get_mission } let!(:mission_operation) { create(:operation, mission_id: mission.id) } diff --git a/spec/features/option_sets/option_set_import_spec.rb b/spec/system/option_sets/option_set_import_spec.rb similarity index 96% rename from spec/features/option_sets/option_set_import_spec.rb rename to spec/system/option_sets/option_set_import_spec.rb index 603bb4764d..24a5102c90 100644 --- a/spec/features/option_sets/option_set_import_spec.rb +++ b/spec/system/option_sets/option_set_import_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "option set import", js: true do +describe "option set import", js: true do include_context "file import" let(:admin) { create(:admin) } diff --git a/spec/features/questions/question_import_spec.rb b/spec/system/questions/question_import_spec.rb similarity index 96% rename from spec/features/questions/question_import_spec.rb rename to spec/system/questions/question_import_spec.rb index 43cf71e149..5f9e1e7161 100644 --- a/spec/features/questions/question_import_spec.rb +++ b/spec/system/questions/question_import_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "question import", js: true do +describe "question import", js: true do include_context "file import" let(:admin) { create(:admin) } diff --git a/spec/features/remember_context_spec.rb b/spec/system/remember_context_spec.rb similarity index 97% rename from spec/features/remember_context_spec.rb rename to spec/system/remember_context_spec.rb index 948f6efc87..a1a965cf20 100644 --- a/spec/features/remember_context_spec.rb +++ b/spec/system/remember_context_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "remember context", js: true do +describe "remember context", js: true do let!(:user) { create(:user) } let!(:other_user) { create(:user) } let!(:form) { create(:form, :live) } diff --git a/spec/features/reports/report_generation_spec.rb b/spec/system/reports/report_generation_spec.rb similarity index 98% rename from spec/features/reports/report_generation_spec.rb rename to spec/system/reports/report_generation_spec.rb index 4647a72d6d..7d7e85c782 100644 --- a/spec/features/reports/report_generation_spec.rb +++ b/spec/system/reports/report_generation_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "report generation", js: true do +describe "report generation", js: true do let!(:user) { create(:user) } let!(:form) { create(:form, question_types: %w[integer select_one text]) } let!(:response1) { create(:response, form: form, answer_values: %w[1 Cat Foo]) } diff --git a/spec/features/responses/csv_export_spec.rb b/spec/system/responses/csv_export_spec.rb similarity index 98% rename from spec/features/responses/csv_export_spec.rb rename to spec/system/responses/csv_export_spec.rb index d7685abc4f..d1f4efac54 100644 --- a/spec/features/responses/csv_export_spec.rb +++ b/spec/system/responses/csv_export_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "responses csv export" do +describe "responses csv export" do include ActiveJob::TestHelper let(:form) { create(:form, :live, question_types: %w[integer multilevel_select_one]) } @@ -147,7 +147,7 @@ context "No space on disk for bulk media export" do before do stub = double(block_size: 0, blocks_available: 0) - allow(Sys::Filesystem).to receive(:stat).and_return(stub) + allow(Sys::Filedescribe).to receive(:stat).and_return(stub) end scenario "Should see an error" do diff --git a/spec/features/responses/display_logic_spec.rb b/spec/system/responses/display_logic_spec.rb similarity index 99% rename from spec/features/responses/display_logic_spec.rb rename to spec/system/responses/display_logic_spec.rb index 55f82adce7..83a0676af4 100644 --- a/spec/features/responses/display_logic_spec.rb +++ b/spec/system/responses/display_logic_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "response form display logic", js: true do +describe "response form display logic", js: true do include_context "response tree" before { login(create(:user)) } diff --git a/spec/features/responses/enketo_spec.rb b/spec/system/responses/enketo_spec.rb similarity index 99% rename from spec/features/responses/enketo_spec.rb rename to spec/system/responses/enketo_spec.rb index c2c9120e8a..ca62e8c10d 100644 --- a/spec/features/responses/enketo_spec.rb +++ b/spec/system/responses/enketo_spec.rb @@ -11,7 +11,7 @@ # so the nemo codebase cannot be responsible for ensuring that enketo continues functioning as advertised. # These specs should be limited to ensuring that the interaction BETWEEN nemo and enketo continues working. # -feature "enketo form rendering and submission", js: true do +describe "enketo form rendering and submission", js: true do include_context "form design conditional logic for Enketo" include_context "odk submissions" diff --git a/spec/features/responses/file_upload_spec.rb b/spec/system/responses/file_upload_spec.rb similarity index 98% rename from spec/features/responses/file_upload_spec.rb rename to spec/system/responses/file_upload_spec.rb index a2924c12c1..1c633173c3 100644 --- a/spec/features/responses/file_upload_spec.rb +++ b/spec/system/responses/file_upload_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "response form file upload", js: true do +describe "response form file upload", js: true do include_context "response tree" include_context "file import" diff --git a/spec/features/responses/form_rendering_and_submission_spec.rb b/spec/system/responses/form_rendering_and_submission_spec.rb similarity index 98% rename from spec/features/responses/form_rendering_and_submission_spec.rb rename to spec/system/responses/form_rendering_and_submission_spec.rb index 48f1496b00..bf89c8683b 100644 --- a/spec/features/responses/form_rendering_and_submission_spec.rb +++ b/spec/system/responses/form_rendering_and_submission_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "response form rendering and submission", js: true do +describe "response form rendering and submission", js: true do let(:submission_time) { Time.zone.parse("2020-04-20 12:30 UTC") } around do |example| @@ -262,7 +262,7 @@ end end - # Normally we wouldn't feature test something as simple as validation but this form + # Normally we wouldn't describe test something as simple as validation but this form # has a lot going on with e.g. skip logic. context "with required question", flapping: true do before do diff --git a/spec/features/responses/index_spec.rb b/spec/system/responses/index_spec.rb similarity index 99% rename from spec/features/responses/index_spec.rb rename to spec/system/responses/index_spec.rb index 7c851d2170..8830c6e5bb 100644 --- a/spec/features/responses/index_spec.rb +++ b/spec/system/responses/index_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "responses index", js: true do +describe "responses index", js: true do let(:actor) { create(:user) } let(:form) { create(:form, :live, name: "TheForm", question_types: %w[text]) } let(:mission) { get_mission } diff --git a/spec/features/responses/location_picker_spec.rb b/spec/system/responses/location_picker_spec.rb similarity index 96% rename from spec/features/responses/location_picker_spec.rb rename to spec/system/responses/location_picker_spec.rb index 8c147f71e1..f3450e8cb1 100644 --- a/spec/features/responses/location_picker_spec.rb +++ b/spec/system/responses/location_picker_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "response form location picker", js: true do +describe "response form location picker", js: true do include_context "response tree" let(:user) { create(:user) } diff --git a/spec/features/responses/odata_export_spec.rb b/spec/system/responses/odata_export_spec.rb similarity index 92% rename from spec/features/responses/odata_export_spec.rb rename to spec/system/responses/odata_export_spec.rb index bf8b902d20..f1ab29a1f7 100644 --- a/spec/features/responses/odata_export_spec.rb +++ b/spec/system/responses/odata_export_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "responses odata export", js: true do +describe "responses odata export", js: true do let(:user) { create(:user) } let(:params) do { diff --git a/spec/features/responses/read_only_spec.rb b/spec/system/responses/read_only_spec.rb similarity index 98% rename from spec/features/responses/read_only_spec.rb rename to spec/system/responses/read_only_spec.rb index 83fa562d91..bbb27238c6 100644 --- a/spec/features/responses/read_only_spec.rb +++ b/spec/system/responses/read_only_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "response form read only mode", js: true do +describe "response form read only mode", js: true do include_context "response tree" let(:user) { create(:user) } diff --git a/spec/features/responses/reviewer_notes_spec.rb b/spec/system/responses/reviewer_notes_spec.rb similarity index 97% rename from spec/features/responses/reviewer_notes_spec.rb rename to spec/system/responses/reviewer_notes_spec.rb index 9681697969..6416f0b1d6 100644 --- a/spec/features/responses/reviewer_notes_spec.rb +++ b/spec/system/responses/reviewer_notes_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "response form reviewer notes", js: true do +describe "response form reviewer notes", js: true do let(:reviewer) { create(:user) } let(:enumerator) { create(:user, role_name: :enumerator) } let(:form) { create(:form, :live, question_types: %w[integer]) } diff --git a/spec/features/responses/skip_logic_spec.rb b/spec/system/responses/skip_logic_spec.rb similarity index 99% rename from spec/features/responses/skip_logic_spec.rb rename to spec/system/responses/skip_logic_spec.rb index 4b52580e9c..9445b019c2 100644 --- a/spec/features/responses/skip_logic_spec.rb +++ b/spec/system/responses/skip_logic_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "response form skip logic", js: true do +describe "response form skip logic", js: true do include_context "response tree" let(:user) { create(:user) } diff --git a/spec/features/search/question_search_spec.rb b/spec/system/search/question_search_spec.rb similarity index 97% rename from spec/features/search/question_search_spec.rb rename to spec/system/search/question_search_spec.rb index f7ed0e3f56..b024c4353e 100644 --- a/spec/features/search/question_search_spec.rb +++ b/spec/system/search/question_search_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "question search", js: true do +describe "question search", js: true do include_context "search" let!(:mission) { get_mission } diff --git a/spec/features/search/response_search_spec.rb b/spec/system/search/response_search_spec.rb similarity index 99% rename from spec/features/search/response_search_spec.rb rename to spec/system/search/response_search_spec.rb index dcf648f889..5ddda045e7 100644 --- a/spec/features/search/response_search_spec.rb +++ b/spec/system/search/response_search_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "response search", js: true do +describe "response search", js: true do include_context "search" let!(:mission) { get_mission } diff --git a/spec/features/search/sms/message_search_spec.rb b/spec/system/search/sms/message_search_spec.rb similarity index 96% rename from spec/features/search/sms/message_search_spec.rb rename to spec/system/search/sms/message_search_spec.rb index c3e5726f8d..a17a628d36 100644 --- a/spec/features/search/sms/message_search_spec.rb +++ b/spec/system/search/sms/message_search_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "sms message search", js: true do +describe "sms message search", js: true do include_context "search" let!(:mission) { get_mission } diff --git a/spec/features/search/user_search_spec.rb b/spec/system/search/user_search_spec.rb similarity index 97% rename from spec/features/search/user_search_spec.rb rename to spec/system/search/user_search_spec.rb index 3918b35605..ddf2137fe4 100644 --- a/spec/features/search/user_search_spec.rb +++ b/spec/system/search/user_search_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "user search", js: true do +describe "user search", js: true do include_context "search" let!(:mission) { get_mission } diff --git a/spec/features/settings/settings_regenerable_field_spec.rb b/spec/system/settings/settings_regenerable_field_spec.rb similarity index 94% rename from spec/features/settings/settings_regenerable_field_spec.rb rename to spec/system/settings/settings_regenerable_field_spec.rb index ccdc597a18..312525c8d8 100644 --- a/spec/features/settings/settings_regenerable_field_spec.rb +++ b/spec/system/settings/settings_regenerable_field_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "settings regenerable fields", js: true do +describe "settings regenerable fields", js: true do include_context "regenerable fields" let!(:mission) { get_mission } diff --git a/spec/features/settings/sms_settings_form_spec.rb b/spec/system/settings/sms_settings_form_spec.rb similarity index 98% rename from spec/features/settings/sms_settings_form_spec.rb rename to spec/system/settings/sms_settings_form_spec.rb index 392d1cc469..415485f43f 100644 --- a/spec/features/settings/sms_settings_form_spec.rb +++ b/spec/system/settings/sms_settings_form_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "sms settings form", :sms do +describe "sms settings form", :sms do let(:mission) { create(:mission) } let(:user) { create(:user, admin: true) } diff --git a/spec/features/sms/sms_console_spec.rb b/spec/system/sms/sms_console_spec.rb similarity index 94% rename from spec/features/sms/sms_console_spec.rb rename to spec/system/sms/sms_console_spec.rb index 5c1ed6365e..fd8c70c9a3 100644 --- a/spec/features/sms/sms_console_spec.rb +++ b/spec/system/sms/sms_console_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "SMS Console", js: true do +describe "SMS Console", js: true do let!(:user) { create(:user) } let!(:mission_name) { get_mission.compact_name } let(:form) { create(:form, :live, question_types: %w[integer], smsable: true) } diff --git a/spec/features/sms/sms_guide_spec.rb b/spec/system/sms/sms_guide_spec.rb similarity index 99% rename from spec/features/sms/sms_guide_spec.rb rename to spec/system/sms/sms_guide_spec.rb index 34997e8850..6fd89fa438 100644 --- a/spec/features/sms/sms_guide_spec.rb +++ b/spec/system/sms/sms_guide_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "SMS Guide", js: true do +describe "SMS Guide", js: true do let!(:user) { create(:user) } before do diff --git a/spec/features/sms/sms_index_spec.rb b/spec/system/sms/sms_index_spec.rb similarity index 97% rename from spec/features/sms/sms_index_spec.rb rename to spec/system/sms/sms_index_spec.rb index 73ad10bb50..12e3d3d4d5 100644 --- a/spec/features/sms/sms_index_spec.rb +++ b/spec/system/sms/sms_index_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "sms index", js: true do +describe "sms index", js: true do include_context "search" let(:user) { create(:user) } diff --git a/spec/features/translatable_spec.rb b/spec/system/translatable_spec.rb similarity index 97% rename from spec/features/translatable_spec.rb rename to spec/system/translatable_spec.rb index 8f186d5ec6..284c788885 100644 --- a/spec/features/translatable_spec.rb +++ b/spec/system/translatable_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "translatable strings" do +describe "translatable strings" do let(:user) { create(:user, admin: true) } let(:question) { create(:question, name_translations: {en: "FooBar"}) } diff --git a/spec/features/users/login_spec.rb b/spec/system/users/login_spec.rb similarity index 96% rename from spec/features/users/login_spec.rb rename to spec/system/users/login_spec.rb index 915cec9ec1..803d288ee9 100644 --- a/spec/features/users/login_spec.rb +++ b/spec/system/users/login_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "login", js: true do +describe "login", js: true do let(:user) { create(:user) } before do diff --git a/spec/features/users/password_reset_spec.rb b/spec/system/users/password_reset_spec.rb similarity index 99% rename from spec/features/users/password_reset_spec.rb rename to spec/system/users/password_reset_spec.rb index b2a445debb..69764095cf 100644 --- a/spec/features/users/password_reset_spec.rb +++ b/spec/system/users/password_reset_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "password reset" do +describe "password reset" do let(:user) { create(:user) } context "if not logged in" do diff --git a/spec/features/users/user_bulk_destroy_spec.rb b/spec/system/users/user_bulk_destroy_spec.rb similarity index 98% rename from spec/features/users/user_bulk_destroy_spec.rb rename to spec/system/users/user_bulk_destroy_spec.rb index fe320d7ef8..bb37a9e846 100644 --- a/spec/features/users/user_bulk_destroy_spec.rb +++ b/spec/system/users/user_bulk_destroy_spec.rb @@ -3,7 +3,7 @@ require "rails_helper" # This spec covers bulk destroy and select/deselect all logic for all index pages. -feature "user bulk destroy", js: true do +describe "user bulk destroy", js: true do include_context "search" include_context "bulk destroy" let(:admin) { create(:admin, name: "Alpha") } # So that this user comes first in the list. diff --git a/spec/features/users/user_form_password_spec.rb b/spec/system/users/user_form_password_spec.rb similarity index 99% rename from spec/features/users/user_form_password_spec.rb rename to spec/system/users/user_form_password_spec.rb index caacbef39d..b03793069f 100644 --- a/spec/features/users/user_form_password_spec.rb +++ b/spec/system/users/user_form_password_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "user form password field" do +describe "user form password field" do let(:mission) { get_mission } before { login(actor) } diff --git a/spec/features/users/user_form_spec.rb b/spec/system/users/user_form_spec.rb similarity index 98% rename from spec/features/users/user_form_spec.rb rename to spec/system/users/user_form_spec.rb index 064e6dcaeb..3eb9d7a2ee 100644 --- a/spec/features/users/user_form_spec.rb +++ b/spec/system/users/user_form_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "user form", js: true do +describe "user form", js: true do let(:admin) { create(:admin) } let!(:mission) { create(:mission) } diff --git a/spec/features/users/user_import_spec.rb b/spec/system/users/user_import_spec.rb similarity index 96% rename from spec/features/users/user_import_spec.rb rename to spec/system/users/user_import_spec.rb index 94722bfa2b..fd300450e4 100644 --- a/spec/features/users/user_import_spec.rb +++ b/spec/system/users/user_import_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "user import", js: true do +describe "user import", js: true do include_context "file import" let(:admin) { create(:admin) } diff --git a/spec/features/users/user_index_spec.rb b/spec/system/users/user_index_spec.rb similarity index 98% rename from spec/features/users/user_index_spec.rb rename to spec/system/users/user_index_spec.rb index a8f49ab670..24c0cb4ac9 100644 --- a/spec/features/users/user_index_spec.rb +++ b/spec/system/users/user_index_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "user index", js: true do +describe "user index", js: true do let(:mission) { get_mission } let(:actor) { create(:user, role_name: :coordinator) } let!(:user1) { create(:user, name: "Apple", login: "apple") } diff --git a/spec/features/users/user_regenerable_field_spec.rb b/spec/system/users/user_regenerable_field_spec.rb similarity index 89% rename from spec/features/users/user_regenerable_field_spec.rb rename to spec/system/users/user_regenerable_field_spec.rb index 871669857b..3488975fe0 100644 --- a/spec/features/users/user_regenerable_field_spec.rb +++ b/spec/system/users/user_regenerable_field_spec.rb @@ -2,7 +2,7 @@ require "rails_helper" -feature "user regenerable fields", js: true do +describe "user regenerable fields", js: true do include_context "regenerable fields" let!(:user) { create(:user) }