discourse/spec
Osama Sayegh 7c12b75a5c
DEV: Fix flaky spec for the /about admin config area (#27697)
There's currently a race condition in the following spec:

65be7a7880/spec/system/admin_about_config_area_spec.rb (L70-L95)

where the form can be saved before the image uploader field has finished uploading the selected image and causing the assertion at line 94 to fail with the following error:

```
Failure/Error: expect(SiteSetting.about_banner_image.sha1).to eq(Upload.generate_digest(image_file))

NoMethodError:
  undefined method `sha1' for nil

[Screenshot Image]: /__w/discourse/discourse/tmp/capybara/failures_r_spec_example_groups_admin_about_config_area_page_the_general_settings_card_can_saves_its_fields_to_their_corresponding_site_settings_312.png

~~~~~~~ JS LOGS ~~~~~~~
http://localhost:31338/assets/vendor.js 15902:14 "WARNING: uppy needs a unique id, pass one in to the component implementing this mixin"
~~~~~ END JS LOGS ~~~~~

./spec/system/admin_about_config_area_spec.rb:94:in `block (3 levels) in <main>'
./spec/rails_helper.rb:552:in `block (3 levels) in <top (required)>'
./spec/rails_helper.rb:552:in `block (2 levels) in <top (required)>'
./spec/rails_helper.rb:513:in `block (3 levels) in <top (required)>'
./spec/rails_helper.rb:503:in `block (2 levels) in <top (required)>'
./spec/rails_helper.rb:460:in `block (2 levels) in <top (required)>'
./vendor/bundle/ruby/3.3.0/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
```

This PR fixes the problem by making the system test wait for the image to finish uploading (with 10 seconds timeout) before carrying out the rest of the system test.
2024-07-04 10:39:22 +10:00
..
fabricators FIX: Correctly highlight new topic-list-items in glimmer (#27623) 2024-06-26 20:04:33 +02:00
fixtures FEATURE: Support Spotify Onebox (#27540) 2024-06-19 13:27:27 -03:00
generator DEV: Silence the output of migration specs (#26365) 2024-03-26 11:32:44 +01:00
helpers FIX: Include HTML content for authenticated users with crawler UA (#26757) 2024-04-25 22:41:57 +01:00
import_export DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
initializers DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
integration Revert "DEV: Upgrade Rails to version 7.1" (#27625) 2024-06-26 18:55:05 +02:00
integrity FEATURE: Only count topic views for explicit/deferred tracked views (#27533) 2024-07-03 10:38:49 +10:00
jobs DEV: Remove summarization code (#27373) 2024-07-02 08:51:47 -07:00
lib SECURITY: Fix Stored-dom XSS via Facebook Oneboxes 2024-07-03 20:49:22 +08:00
mailers FIX: correctly compute the window for email summaries 2024-05-27 22:33:51 +02:00
migrations DEV: Remove invalid content_security_policy_script_src site setting values from DB (#27588) 2024-06-27 22:17:56 +08:00
models FIX: Discrepency between admin page view reports (#27685) 2024-07-04 10:16:09 +10:00
multisite DEV: Add S3 upload system specs using minio (#22975) 2023-08-23 11:18:33 +10:00
requests SECURITY: Don't allow suspending staff users via other_user_ids param 2024-07-03 20:49:29 +08:00
script/import_scripts DEV: Catch missing translations during test runs (#26258) 2024-05-24 22:15:53 +08:00
serializers SECURITY: Update reviewable user serializer payload 2024-07-03 20:49:19 +08:00
services SECURITY: Don't allow suspending staff users via other_user_ids param 2024-07-03 20:49:29 +08:00
support DEV: Remove summarization code (#27373) 2024-07-02 08:51:47 -07:00
system DEV: Fix flaky spec for the /about admin config area (#27697) 2024-07-04 10:39:22 +10:00
tasks DEV: Improve test coverage of themes:update rake task (#26764) 2024-04-26 10:04:15 +08:00
views FEATURE: Simplify crawler content for non-canonical post URLs (#26324) 2024-03-26 15:18:46 +00:00
rails_helper.rb Revert "DEV: Upgrade Rails to version 7.1" (#27625) 2024-06-26 18:55:05 +02:00
regenerate_swagger_docs
swagger_helper.rb DEV: Bump rswag-specs from 2.11.0 to 2.13.0 (#24654) 2023-12-07 08:16:47 +08:00