Revert "DEV: Update checks in chat channel and thread page objects (#21875)" (#21883)

This reverts commit ddf4ecba04f3c6396615506ec595650f14986758.

Causing a flaky test to appear:

```
main $ LOAD_PLUGINS=1 rspec plugins/chat/spec/system/chat/composer/shortcuts/channel_spec.rb

Randomized with seed 17765
.....F..

Failures:

  1) Chat | composer | shortcuts | channel when using ArrowUp when last message is staged does not edit a message
     Failure/Error: channel_page.send_message
       expected `#<PageObjects::Components::Chat::Messages:0x00007fe823ac1710 @context=".chat-channel">.has_message?({:persisted=>true, :text=>"2"})` to be truthy, got false

     [Screenshot Image]: /home/tgxworld/work/discourse/tmp/capybara/failures_r_spec_example_groups_chat_composer_shortcuts_channel_when_using_arrow_up_when_last_message_is_staged_does_not_edit_a_message_148.png
```
This commit is contained in:
Alan Guo Xiang Tan
2023-06-01 17:59:03 +09:00
committed by GitHub
parent 0494157452
commit 30e4ebd19b
6 changed files with 10 additions and 18 deletions

View File

@ -16,7 +16,7 @@ RSpec.describe "Message errors", type: :system, js: true do
sign_in(current_user)
chat_page.visit_channel(channel)
channel_page.send_message("atoolongmessage" + "a" * max_length, check_message_presence: false)
channel_page.send_message("atoolongmessage" + "a" * max_length)
expect(page).to have_no_content("atoolongmessage")
expect(page).to have_content(I18n.t("chat.errors.message_too_long", count: max_length))