discourse/spec/system/page_objects/pages
Krzysztof Kotlarek 56524f4bdf
DEV: flaky toggle flag spec (#28292)
Very similar to move up/down flag problem fixed here -  https://github.com/discourse/discourse/pull/28272

Those are the steps to toggle the flag:
1. click toggle - `saving` CSS class is added;
2. request to backend;
3. `saving` CSS class is removed.

And check if the flag was toggle was:
```ruby
def has_saved_flag?(key)
  has_css?(".admin-flag-item.#{key}.saving")
  has_no_css?(".admin-flag-item.#{key}.saving")
end
```
If the save action is very fast, then the saving class is removed before the first check.

Therefore I decided to invert it, and once action is finished add `saved` CSS class.

Then we can have a quick positive check:

```ruby
def has_saved_flag?(key)
  has_css?(".admin-flag-item.#{key}.saved")
end
```
2024-08-09 09:56:10 +10:00
..
about.rb DEV: Add site age and site activities section to the redesigned about page (#28214) 2024-08-07 11:11:41 +03:00
admin_about_config_area.rb DEV: Wiring for the admin about config page (#27492) 2024-07-01 05:40:37 +03:00
admin_customize_themes.rb FEATURE: direct link to components for admin sidebar (#26644) 2024-04-17 11:45:59 +10:00
admin_dashboard_new_features.rb UX: group admin new features by month (#28106) 2024-07-29 14:20:12 +10:00
admin_flag_form.rb UX: move admin flag form to form-kit (#28187) 2024-08-05 11:01:25 +10:00
admin_flags.rb DEV: flaky toggle flag spec (#28292) 2024-08-09 09:56:10 +10:00
admin_objects_theme_setting_editor.rb UX: Improve validation error message when saving theme objects setting (#26455) 2024-04-02 11:55:51 +08:00
admin_site_settings.rb DEV: Fix flaky admin confirmation spec (#27784) 2024-07-09 12:05:31 +10:00
admin_staff_action_logs.rb DEV: Allow for setting a message with SiteSetting.set_and_log (#27447) 2024-06-13 14:59:49 +10:00
admin_user_fields.rb FEATURE: User fields required for existing users - Part 2 (#27172) 2024-06-25 19:32:18 +08:00
admin_watched_words.rb UX: limit "outputs HTML" watched word option to replacements (#28063) 2024-07-25 16:25:56 -03:00
admin_web_hook_events.rb FEATURE: Add Filter for Webhook Events by Status (#27332) 2024-06-07 10:26:00 -05:00
base.rb DEV: Change sidebar header dropdown to use wait_for_animation (#20627) 2023-03-10 14:54:57 +10:00
category.rb FIX: should not raise error when minimum_required_tags value not defined for category. (#27658) 2024-07-01 07:14:34 +05:30
csv_export_pm.rb DEV: make sure we don't load all data into memory when exporting chat messages (#22276) 2023-07-12 18:52:18 +04:00
discovery.rb DEV: Add system specs for dismiss new on tag routes (#23936) 2023-10-16 10:51:59 +01:00
form_template.rb FIX: Customize form template view modal footer buttons (#25804) 2024-02-21 22:20:56 -08:00
group_activity_posts.rb FIX: respect creation date when paginating group activity posts (#24993) 2024-01-11 13:37:27 -03:00
group.rb FIX: deleting a groups was throwing an error (#26623) 2024-04-15 08:35:50 +02:00
header.rb FIX: In topic search for glimmer header (#26040) 2024-03-07 11:14:43 -07:00
review.rb DEV: upgrade reject reason reviewable modal to glimmer component (#24073) 2023-10-24 17:44:43 +08:00
search.rb DEV: adds logo page component (#28276) 2024-08-08 13:52:48 +02:00
tag.rb DEV: fix tag synonyms flakey specs (#21787) 2023-05-28 15:35:55 +02:00
topic.rb FEATURE: admin can disable flags (#27171) 2024-05-29 14:39:58 +10:00
user_notifications.rb DEV: Plugin-api methods for user-notifications route customizations (#24873) 2023-12-13 15:15:42 -06:00
user_preferences_account.rb DEV: upgrade avatar-selector modal to glimmer component (#24192) 2023-11-07 21:02:19 +08:00
user_preferences_interface.rb DEV: Fix flaky user preferences interface system test (#21800) 2023-05-29 11:56:21 +08:00
user_preferences_navigation_menu.rb FEATURE: Split navigation preference for count and behavior of sidebar links (#22203) 2023-06-22 19:04:13 +03:00
user_preferences_profile.rb FIX: show cooked bio in user profile (#27734) 2024-07-05 12:31:57 +02:00
user_preferences_security.rb DEV: Standardize session confirmation prompt (#24212) 2023-11-07 11:26:10 -05:00
user_preferences.rb DEV: Fix flaky "Changing email" system tests (#25805) 2024-02-22 10:46:37 +08:00
user_private_messages.rb FIX: Broken group messages inboxes when group name is mixed case (#22183) 2023-06-19 17:36:04 +08:00
user_reset_password.rb FIX: User can't reset password with backup codes when only security key is enabled (#27368) 2024-06-06 14:30:42 +08:00
user.rb DEV: Plugin-api methods for user-notifications route customizations (#24873) 2023-12-13 15:15:42 -06:00
wizard.rb DEV: Update member access wizard step to use toggle group (#28013) 2024-07-29 14:07:06 +08:00