discourse/spec/system/page_objects/components
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
..
navigation_menu FEATURE: Force admin sidebar for all admins in admin_sidebar_enabled_groups and handle legacy "hamburger dropdown" in this mode (#26899) 2024-05-13 14:40:23 +10:00
ace_editor.rb DEV: Allow typed objects theme settings to be saved via settings editor (#26100) 2024-03-11 08:42:12 +08:00
admin_about_config_area_contact_information_card.rb DEV: Wiring for the admin about config page (#27492) 2024-07-01 05:40:37 +03:00
admin_about_config_area_general_settings_card.rb DEV: Wiring for the admin about config page (#27492) 2024-07-01 05:40:37 +03:00
admin_about_config_area_your_organization_card.rb DEV: Wiring for the admin about config page (#27492) 2024-07-01 05:40:37 +03:00
admin_theme_settings_editor.rb DEV: Allow typed objects theme settings to be saved via settings editor (#26100) 2024-03-11 08:42:12 +08:00
admin_theme_translations_settings_editor.rb FEATURE: add language picker for theme translations in admin UI (#26150) 2024-03-18 12:00:28 -04:00
base.rb DEV: Change sidebar header dropdown to use wait_for_animation (#20627) 2023-03-10 14:54:57 +10:00
bookmark_menu.rb DEV: implements <DropdownMenu /> (#26917) 2024-05-08 09:08:42 +02:00
calendar_date_time_picker.rb DEV: Add more structure for admin plugin config nav (#26707) 2024-05-02 11:36:46 +10:00
category_badge.rb FEATURE: Bulk topic tagging allowing restricted operations on sole categories (#26602) 2024-04-12 13:10:14 +10:00
category_list.rb DEV: Implement glimmer topic-list (#26743) 2024-05-21 14:36:15 +02:00
composer.rb FIX: prevents showing discard modal on re-edit (#26639) 2024-04-16 10:34:32 +02:00
d_toggle_switch.rb UI: redesigned settings/members (#23804) 2023-10-09 14:11:16 +02:00
dialog.rb DEV: Add confirm_danger to Dialog page object (#26846) 2024-05-03 09:31:16 +10:00
emoji_picker.rb DEV: Speed up core system tests (#21394) 2023-05-05 07:45:53 +08:00
fast_editor.rb FIX: Fast edit doesn’t work on content with certain characters (#20410) 2023-02-23 11:30:16 +08:00
filter.rb FEATURE: move back to the forum link above the filter (#26070) 2024-03-07 14:48:16 +11:00
group-card.rb FIX: Member Highlights on Group Cards (#22828) 2023-07-28 14:33:42 +00:00
new_topic_list_toggle_tab.rb FEATURE: New topics vs replies toggle for the new new view (#22920) 2023-08-18 12:44:04 +08:00
new_topic_list_toggle.rb UX: update /new toggle styles, class names (#23154) 2023-08-21 09:34:12 +08:00
pikaday_calendar.rb DEV: Add more structure for admin plugin config nav (#26707) 2024-05-02 11:36:46 +10:00
private_message_map.rb DEV: convert PrivateMessageMap widget to glimmer components (#25837) 2024-03-04 10:24:25 +08:00
select_kit.rb DEV: Added has_option_value test to SelectKit system spec component (#26041) 2024-03-06 07:04:05 +08:00
sidebar_header_dropdown.rb UX: Remove section heading for community section (#22405) 2023-07-11 09:40:37 +08:00
theme_translation_text_area.rb FEATURE: add language picker for theme translations in admin UI (#26150) 2024-03-18 12:00:28 -04:00
toasts.rb UX: enhances chat copy features (#23770) 2023-10-04 16:14:37 +02:00
topic_list_controls.rb UX: Don't hide new navigation item in experimental new new view (#26094) 2024-03-08 09:26:09 +08:00
topic_list_header.rb FEATURE: Use new topic bulk actions dropdown on search page (#27303) 2024-06-07 10:41:42 +10:00
topic_list.rb FIX: Correctly highlight new topic-list-items in glimmer (#27623) 2024-06-26 20:04:33 +02:00
topic_map.rb DEV: add system test for topic map (#25242) 2024-01-17 19:25:18 +08:00
topic_query_filter.rb FIX: /filter route input field not updating on route change (#23119) 2023-08-17 09:04:48 +08:00
topic_view.rb FIX: correctly untrack topics when dismiss unread (#23894) 2023-10-11 02:51:43 +00:00
uppy_image_uploader.rb DEV: Fix flaky spec for the /about admin config area (#27697) 2024-07-04 10:39:22 +10:00
user_menu.rb DEV: Add setUserMenuNotificationsLimit plugin-api method (#25119) 2024-01-09 08:38:00 +08:00