mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
DEV: Update checks in chat channel and thread page objects (#21889)
What is the problem? We were calling out to methods that calls `has_css?` or `has_selector?` which returns a boolean. Since we are not using the return value, it means the methods can be deemed unnecessary. However, we do want those checks and this commit adds the necessarily assertions to make use of the return values.
This commit is contained in:

committed by
GitHub

parent
0d0ca075a6
commit
d1924c7328
@ -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)
|
||||
channel_page.send_message("atoolongmessage" + "a" * max_length, check_message_presence: false)
|
||||
|
||||
expect(page).to have_no_content("atoolongmessage")
|
||||
expect(page).to have_content(I18n.t("chat.errors.message_too_long", count: max_length))
|
||||
|
Reference in New Issue
Block a user