discourse/app/assets/javascripts
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
..
admin DEV: flaky toggle flag spec (#28292) 2024-08-09 09:56:10 +10:00
custom-proxy Build(deps-dev): Bump glob from 10.4.2 to 10.4.3 (#27751) 2024-07-08 08:40:31 +08:00
deprecation-silencer DEV: Silence whitespace-eating-comment warnings (#27129) 2024-05-22 16:21:51 +02:00
dialog-holder Build(deps-dev): Bump webpack from 5.92.1 to 5.93.0 (#27882) 2024-07-12 01:30:31 +02:00
discourse Build(deps-dev): Bump @floating-ui/dom from 1.6.9 to 1.6.10 (#28270) 2024-08-08 23:25:47 +02:00
discourse-common DEV: Update ember-cli-deprecation-workflow from 2.2.0 to 3.0.1 (#28226) 2024-08-07 17:59:42 +02:00
discourse-hbr DEV: Convert discourse-hbr to a regular package (#26562) 2024-04-08 20:00:34 +01:00
discourse-i18n UX: respect current locale on topic map views date format (#28199) 2024-08-05 13:18:48 -03:00
discourse-markdown-it SECURITY: Fixes for main (#28137) 2024-07-30 14:19:01 +08:00
discourse-plugins DEV: Upgrade babel & remove vendored safari-bugfix transformation (#28208) 2024-08-05 10:35:26 +01:00
discourse-widget-hbs DEV: Upgrade babel & remove vendored safari-bugfix transformation (#28208) 2024-08-05 10:35:26 +01:00
docs
ember-addons
ember-cli-progress-ci PERF: Improve production JS build in low-memory environments (#26849) 2024-05-02 11:43:59 +01:00
ember-production-deprecations DEV: Update ember-cli-deprecation-workflow from 2.2.0 to 3.0.1 (#28226) 2024-08-07 17:59:42 +02:00
float-kit DEV: Upgrade babel & remove vendored safari-bugfix transformation (#28208) 2024-08-05 10:35:26 +01:00
locales FEATURE: Add Uyghur language (#27183) 2024-05-27 09:58:18 +02:00
pretty-text DEV: Upgrade babel & remove vendored safari-bugfix transformation (#28208) 2024-08-05 10:35:26 +01:00
select-kit DEV: allows to alter category name/description (#28263) 2024-08-08 17:33:23 +02:00
theme-transpiler Build(deps): Bump terser from 5.31.3 to 5.31.4 (#28269) 2024-08-08 09:50:47 +08:00
truth-helpers Build(deps): Bump ember-auto-import from 2.7.3 to 2.7.4 (#27615) 2024-06-26 01:35:06 +02:00
.npmrc
handlebars-shim.js
polyfills.js
run-patch-package
service-worker.js.erb DEV: Drop workbox dependency (#26735) 2024-04-24 10:19:12 +01:00