discourse/plugins
Joffrey JAFFEUX ab7f3ee599
DEV: adds basic sorting to avoid flakey test (#19711)
`last_message_sent_at` has a `NOT_NULL` constraint in the DB so it should be safe to use for sorting.

This was causing two flakeys:

```
  1) UserNotifications.chat_summary with public channel email subject with regular mentions includes both channel titles when there are exactly two with unread mentions
     Failure/Error: example.run

       expected: "[Discourse] New message in Random 62 and Test channel"
            got: "[Discourse] New message in Test channel and Random 62"

       (compared using ==)
     # ./plugins/chat/spec/mailers/user_notifications_spec.rb:203:in `block (6 levels) in <main>'
     # ./spec/rails_helper.rb:356:in `block (2 levels) in <top (required)>'
     # ./vendor/bundle/ruby/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

  2) UserNotifications.chat_summary with public channel email subject with regular mentions displays a count when there are more than two channels with unread mentions
     Failure/Error: example.run

       expected: "[Discourse] New message in Random 62 and 2 others"
            got: "[Discourse] New message in Test channel 0 and 2 others"

       (compared using ==)
     # ./plugins/chat/spec/mailers/user_notifications_spec.rb:236:in `block (6 levels) in <main>'
     # ./spec/rails_helper.rb:356:in `block (2 levels) in <top (required)>'
     # ./vendor/bundle/ruby/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'
```
2023-01-04 11:00:07 +01:00
..
chat DEV: adds basic sorting to avoid flakey test (#19711) 2023-01-04 11:00:07 +01:00
discourse-details Update translations (#19340) 2022-12-06 16:22:23 +01:00
discourse-local-dates DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
discourse-narrative-bot Update translations (#19633) 2022-12-28 13:32:29 +01:00
discourse-presence DEV: Add extra whitespace to tidy up prettified templates 2022-12-28 13:11:12 +00:00
lazy-yt DEV: Add hidden option to disable the lazy-yt plugin (#19448) 2022-12-14 11:52:17 -03:00
poll DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
styleguide DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00